[SciPy-dev] Undefined NAN in amos_wrappers.c errors on Solaris amd64

David Cournapeau david@ar.media.kyoto-u.ac...
Wed May 6 22:05:57 CDT 2009


Michael Abshoff wrote:
> Dave Peterson wrote:
>
> Hi,
>
>   
>> Finding that many of the other .c files in scipy/special/cephes 
>> contained an extern NAN definition, I ended up inserting the following 
>> in amos_wrappers.c. The file now compiles and 'python setup.py build' 
>> finishes, but is this the "right" fix? I would have thought there was a 
>> common header where this should be declared?
>>
>> extern double INFINITY, NAN;
>>     
>
> I don't believe this is the "right" fix.

No it is not :) We have the right fix (our own portable NPY_NAN macro)
in numpy, but I have not yet found a way to use numpy C libraries into
scipy proper. Once this is done, we will be able to depend on quite a
useful set of portable math functionalities instead of those ugly hacks.
Although technically, for this exact macro, only the header is needed.

cheers,

David


More information about the Scipy-dev mailing list