[Numpy-discussion] bug report: nonzero on masked arrays
Andrew Straw
strawman at astraw.com
Mon Feb 27 12:16:03 CST 2006
I know there's been some discussion along these lines lately, but I
haven't followed it closely and thought I could still give a simple bug
report. I can post this on Trac if no one can tackle it immediately --
let me know.
--Andrew
In [1]: import numpy
In [2]: numpy.__file__
Out[2]:
'/home/astraw/py2.3-linux-x86_64/lib/python2.3/site-packages/numpy-0.9.6.2172-py2.3-linux-x86_64.egg/numpy/__init__.pyc'
In [3]: jj= numpy.ma.masked_array( [0,1,2,3,0,4,5,6],
mask=[0,0,0,1,1,1,0,0])
In [4]: numpy.ma.nonzero(jj)
---------------------------------------------------------------------------
exceptions.NameError Traceback (most
recent call last)
/home/astraw/src/kookaburra/flydra/analysis/<ipython console>
/home/astraw/py2.3-linux-x86_64/lib/python2.3/site-packages/numpy-0.9.6.2172-py2.3-linux-x86_64.egg/numpy/core/ma.py
in __call__(self, a, *args, **kwargs)
317 else:
318 if m.shape != shape:
--> 319 m = mask_or(getmaskarray(a), getmaskarray(b))
320 return masked_array(result, m)
321
NameError: global name 'b' is not defined
In [5]:
More information about the Numpy-discussion
mailing list