Showing posts with label scipy. Show all posts
Showing posts with label scipy. Show all posts

Sunday, August 8, 2010

A problem using scipy and numpy

If you installed scipy and numpy using the Ubuntu command apt-get install [package-name], check if importing scipy.stats results in an error.

There was an error when I tried to import scipy.stats. It complained of wrong data type for
von_mises stats distribution function.

The fix is to remove them using apt-get remove and then reinstalling from the latest svn sources.

svn co http://svn.scipy.org/svn/numpy/trunk numpy
svn co http://svn.scipy.org/svn/scipy/trunk scipy

Istall subversion if not yet installed.
Then cd to each directory and issue sudo python setup.py install to install each package.

Some problems with Ubuntu installed packages.

Out server has been upgraded with bigger disk and RAM and with new OS to boot! However, there are some problems in the install of packages.



scipy:

File "/usr/lib/python2.6/dist-packages/scipy/stats/distributions.py", line 27, in
import vonmises_cython
File "numpy.pxd", line 30, in scipy.stats.vonmises_cython (scipy/stats/vonmises_cython.c:2939)
ValueError: numpy.dtype does not appear to be the correct type object

These problems fixed in our latest blog: A problem using scipy and numpy