20 Nov
2008
20 Nov
'08
5:26 p.m.
The following shows a bug in numpy.ma.allclose: import numpy import numpy.ma a = numpy.arange(100) b=numpy.reshape(a,(10,10)) print b c=numpy.ma.masked_greater(b,98) print c.count() numpy.ma.allclose(b,1) numpy.ma.allclose(c,1) Since c is masked it fails I think it should pass returning either False or True, not sure what it should return in case all the elements are equal to 1 (except of course the masked one) Note that the following works: numpy.ma.allclose(c,numpy.ma.ones(c.shape)) So I'm good for now Thanks, C>
5606
Age (days ago)
5607
Last active (days ago)
1 comments
2 participants
participants (2)
-
Charles سمير Doutriaux
-
Pierre GM