Numerical Python versus SciPy core

If you are like me and use Python to do actual research, you probably know about Numerical Python which provides you with basic linear algebra, complex numbers, FFT and related code.

Two days ago, I had to reinstall Numerical Python and say that they are promoting a replacement called SciPy core. They warn you to stay away from the old Numerical Python. Don’t listen to them!

  • On my machine, the code fails its basic unit testing . The function “linear_least_squares” is broken. Yet, there was no warning while installing. Specifically, here’s what I get:
    >>> scipy.basic.linalg.linear_least_squares(array([[1,1],[1,1]]),array([2,2]))
    Traceback (most recent call last):
    File "", line 1, in ?
    File "/usr/lib64/python2.4/site-packages/scipy/basic/", line 457, in linear_least_squares
    0,work,-1,iwork,0 )
    lapack_lite.LapackError: Parameter b is not contiguous in lapack_lite.dgelsd

    For this reason alone, I suggest you stay away from scipy! (This was verified with version 0.6.1, but it now works with version 0.8.4.)
  • The author figured out it was time to replace the good old “import LinearAlgebra” by “import scipy.basic.linalg” though he claims in the documentation that all you have to do is “import scipy.linalg”. Even so, I want “import LinearAlgebra”, not “import LinAlg” or “import scipy.linalg”. I think most users will agree with me. Cryptic package names are out. (Similarly, the good old “import Numeric” is replaced with “import scipy.base”… what’s wrong with “import scipy”?)
  • The inline documentation for SciPy Core is still incomplete. Typing “help(scipy.basic.linalg)” returns an empty page whereas “help(LinearAlgebra)” would give you a description of the package.

Update: please see a more positive recent post about this package.

Published by

Daniel Lemire

A computer science professor at the University of Quebec (TELUQ).

2 thoughts on “Numerical Python versus SciPy core”

  1. I’d feel tempted to create an intermediate module just containing the single line “import scipy.linalg.*”. I agree that such naming issues can be very annoying. It is very 1960’s FORTRAN to abbreviate names to six characters.

  2. The inline docstrings are *not* missing. Everything from Numeric is there along with new docstrings for new functionality. Please don’t spread misinformation.

    You may disagree with the name changes. If you do, chime in on the mailing lists and let your voice be heard. We are very responsive to users.

    If there is enough demand for it, it would be extremely easy to create compatibility modules.

    The reality is nobody is maintaing Numeric anymore. While it is still useful, it is dying. It will not keep up with newer versions of Python. The great thing about open source is you can still use it if you want, but your peers are moving to something else.

Leave a Reply

Your email address will not be published. The comment form expects plain text. If you need to format your text, you can use HTML elements such strong, blockquote, cite, code and em. For formatting code as HTML automatically, I recommend

You may subscribe to this blog by email.