[Numpy-discussion] Numpy 1.4 MaskedArray bug?

stephen.pascoe@stfc.... stephen.pascoe@stfc....
Tue Jan 12 09:52:22 CST 2010


We have noticed the MaskedArray implementation in numpy-1.4.0 breaks
some of our code.  For instance we see the following:
 
in 1.3.0:

>>> a = numpy.ma.MaskedArray([[1,2,3],[4,5,6]])
>>> numpy.ma.sum(a, 1)
masked_array(data = [ 6 15],
mask = False,
fill_value = 999999)

in 1.4.0

>>> a = numpy.ma.MaskedArray([[1,2,3],[4,5,6]])
>>> numpy.ma.sum(a, 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/usr/lib64/python2.5/site-packages/numpy-1.4.0-py2.5-linux-x86_64.egg/n
umpy/ma/core.py", line 5682, in __call__
    return method(*args, **params)
  File
"/usr/lib64/python2.5/site-packages/numpy-1.4.0-py2.5-linux-x86_64.egg/n
umpy/ma/core.py", line 4357, in sum
    newmask = _mask.all(axis=axis)
ValueError: axis(=1) out of bounds


Also note the "Report Bugs" link on http://numpy.scipy.org is broken
(http://numpy.scipy.org/bug-report.html)

Thanks,
Stephen.
 
---
Stephen Pascoe  +44 (0)1235 445980
British Atmospheric Data Centre
Rutherford Appleton Laboratory
-- 
Scanned by iCritical.


More information about the NumPy-Discussion mailing list