[SciPy-dev] bugs in scipy / Numeric

Andrew Straw strawman at astraw.com
Fri Nov 4 20:01:22 CST 2005

The follwing code apparently exhibits 2 bugs on my linux (Debian sarge)
AMD64 system. I'm using scipy/newcore scipy/newscipy from SVN as of a
few minutes ago and Numeric from CVS ditto (from
:pserver:anonymous at cvs.sourceforge.net:/cvsroot/numpy/Numerical is this
right?). Numeric 24.1 was used in the initial version of this test, but
I updated to CVS just in case something had changed to fix the bug.
Nothing did.

= system info =

$ python
Python 2.3.5 (#2, Nov  3 2005, 02:44:38)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

$ uname -a
Linux hdmg 2.6.14 #1 SMP Tue Nov 1 23:42:27 PST 2005 x86_64 GNU/Linux

= The program =

import scipy
import Numeric

print 'scipy.__scipy_version__',scipy.__scipy_version__
print 'Numeric.__version__',Numeric.__version__


print 'list of scipy scalars -> Numeric array'
print a
print b


print 'list of Numeric scalars -> scipy array'
print a
print b

= The output =

$ python test2.py
Importing io to scipy
Importing fftpack to scipy
Importing special to scipy
Importing cluster to scipy
Importing sparse to scipy
Importing utils to scipy
Importing interpolate to scipy
Importing lib to scipy
Importing integrate to scipy
Importing signal to scipy
Importing optimize to scipy
Importing linalg to scipy
Importing stats to scipy
scipy.__scipy_version__ 0.4.2_1420
Numeric.__version__ 24.1

list of scipy scalars -> Numeric array
[array(5000.0, dtype=float32), array(6000.0, dtype=float32)]
[ˆ p]

list of Numeric scalars -> scipy array
[5000.0, 6000.0]
Traceback (most recent call last):
  File "test2.py", line 21, in ?
    print b
line 238, in array_str
    return array2string(a, max_line_width, precision, suppress_small, '
', "")
line 194, in array2string
    elif reduce(product, a.shape) == 0:
TypeError: a float is required

More information about the Scipy-dev mailing list