[Numpy-discussion] A savespace bug, perhaps?

Nathaniel Gray n8gray at caltech.edu
Thu Aug 2 20:18:13 EDT 2001


Hi everybody,

I'm using Python 2.1.1 and Numpy 20.1.0  This seems to be a problem:

Python 2.1.1 (#2, Jul 31 2001, 14:10:42)                                     
[GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from Numeric import *
>>> from MLab import zeros
>>> joe = zeros(3,'l',1)
>>> fred = array([1,2,3],'l')
>>> joe += fred
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: return array has incorrect type

This fails whether or not fred has the spacesaver flag set.

This, however, works fine:
>>> joe = zeros(3, 'l')
>>> fred = array([1,2,3], 'l')
>>> joe += fred
>>> joe
array([1, 2, 3])

Am I doing something wrong or is this a bug?

Please CC to me since I'm not subscribed to the list.
Thanks a lot!
-Nathan

-- 
Nathaniel Gray

California Institute of Technology
Computation and Neural Systems
--




More information about the NumPy-Discussion mailing list