[NumPy-Tickets] [NumPy] #1493: Masked array equality with None is buggy

NumPy Trac numpy-tickets@scipy....
Thu May 27 10:34:19 CDT 2010


#1493: Masked array equality with None is buggy
----------------------+-----------------------------------------------------
 Reporter:  dhuard    |       Owner:  pierregm
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  2.0.0   
Component:  numpy.ma  |     Version:  devel   
 Keywords:            |  
----------------------+-----------------------------------------------------
 Equality and inequality of masked arrays with None raise an error.

 {{{
 >>> a = np.ma.array([3,4,5], mask=[1,1,1])
 >>> a == None
 ---------------------------------------------------------------------------
 AttributeError                            Traceback (most recent call
 last)

 /home/davhua1/<ipython console> in <module>()

 /usr/local/lib/python2.6/dist-packages/numpy/ma/core.pyc in __ne__(self,
 other)
    3610         omask = getattr(other, '_mask', nomask)
    3611         if omask is nomask:
 -> 3612             check = ndarray.__ne__(self.filled(0),
 other).view(type(self))
    3613             check._mask = self._mask
    3614         else:

 AttributeError: 'bool' object has no attribute 'view'

 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1493>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list