[SciPy-dev] scipy.special for numarray

Todd Miller jmiller at stsci.edu
Mon May 2 17:04:32 EDT 2005


scipy.special now passes all its self tests with numarray using the
tarball of modifications found here:

http://www.stsci.edu/resources/software_hardware/numarray/scipy_special_numarray

To try this out,  the following works on Linux:

0. Get & unpack the tarball

% wget http://www.stsci.edu/resources/software_hardware/numarray/scipy_special_numarray
% tar zxvf scipy_special_numarray.tar.gz
scipy_special_numarray/
scipy_special_numarray/updates.txt
scipy_special_numarray/diffs.txt
scipy_special_numarray/na_cephes.py
scipy_special_numarray/cephes.py
scipy_special_numarray/gen_na_cephes.py
scipy_special_numarray/_na_cephesmodule.c
scipy_special_numarray/nc_cephesmodule.c

1.  Checkout scipy from CVS on scipy.org.

2.  Apply the diffs

% cd scipy
% patch -p0 <../scipy_special_numarray/diffs.txt

3. Save the "added files" into scipy/Lib/special.

% cd ..
% cp scipy_special_numarray/{*.py,*.c} scipy/Lib/special

4. Build scipy (it's important to have both numarray & Numeric already
installed):

% cd scipy
% python setup.py build_ext --backends=numeric,numarray install --force

5. Numeric is the default array package; make sure still works:

% python
>>> import scipy
>>> scipy.test()
... <output clipped>
Ran 676 tests in 3.115s

OK

6. Running using numarray requires setting the environment variable
NUMERIX to numarray. It should be noted that not all of scipy has been
ported to numarray yet:  only scipy_core (except for weave) and
scipy.special have been ported so only scipy.special is tested here.

% setenv NUMERIX numarray
% python
>>> import scipy.special as spec
>>> spec.test()
... <less output clipped>
Ran 342 tests in 2.279s

OK

A top level overview of the changes is in updates.txt.  Barring any
objections I'll commit these changes one week from today.  Comments are
welcome.

Regards,
Todd






More information about the SciPy-Dev mailing list