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> _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion