[Numpy-discussion] bug report: nonzero on masked arrays

Andrew Straw strawman at astraw.com
Mon Feb 27 12:16:03 EST 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.


In [1]: import numpy

In [2]: numpy.__file__

In [3]: jj= numpy.ma.masked_array( [0,1,2,3,0,4,5,6],

In [4]: numpy.ma.nonzero(jj)
exceptions.NameError                                 Traceback (most
recent call last)

/home/astraw/src/kookaburra/flydra/analysis/<ipython console>

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)

NameError: global name 'b' is not defined

In [5]:

More information about the NumPy-Discussion mailing list