[SciPy-dev] erf, erfc and ndtr on OS X

Tobias Wood twood at doc.ic.ac.uk
Mon May 4 18:03:40 EDT 2009


On Sat, 02 May 2009 09:08:50 +0100, Stéfan van der Walt <stefan at sun.ac.za>  
wrote:

> 2009/5/2 Charles R Harris <charlesr.harris at gmail.com>:
>> There was a problem with the endianess in the python header for some
>> versions of python2.6 on Apple. I believe David got it the python folks  
>> to
>> fix it in the most recent versions. Numpy now detects incompatible  
>> endianess
>> assumptions.
>
> Thanks for the reminder.
>
> In this case, I think it's OK to use the Cephes-defined constants?  If
> not, I'll go back and use the NumPy define instead.
>
> Cheers
> Stéfan

It would certainly appear that way. I downloaded the most recent Python  
(Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39)), recompiled Scipy, and  
ndtr(), erf() etc. have started working correctly without any modification  
 from the SVN checkout. Thanks for the heads up Charles.

On a side-note, a simple 'setup.py install' produces huge amounts of  
compiler warnings along the following lines on OS X:
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:1:1:,
                  from  
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                  from scipy/special/_cephesmodule.c:12:
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:21:1:  
warning: "NPY_SIZEOF_SHORT" redefined
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:1:1:  
warning: this is the location of the previous definition
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:22:1:  
warning: "NPY_SIZEOF_INT" redefined
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:2:1:  
warning: this is the location of the previous definition
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:23:1:  
warning: "NPY_SIZEOF_LONG" redefined
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:3:1:  
warning: this is the location of the previous definition
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:24:1:  
warning: "NPY_SIZEOF_FLOAT" redefined
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:4:1:  
warning: this is the location of the previous definition
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:25:1:  
warning: "NPY_SIZEOF_DOUBLE" redefined
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/numpyconfig.h:5:1:  
warning: this is the location of the previous definition
when compiling Scipy (but not Numpy). Anyone know how I could fix this?
Thanks,
Toby



More information about the SciPy-Dev mailing list