All, I've just been pointed to a strange bug in numpy.ma import numpy as np import numpy.ma as ma
assert(ma.masked*float(1) is ma.masked) assert(float(1)*ma.masked is ma.masked) assert(ma.masked*np.float(1) is ma.masked) assert(np.float(1)*ma.masked is ma.masked) assert(ma.masked*np.float_(1) is ma.masked) assert(np.float_(1)*ma.masked is ma.masked) The last assertion fails, and I have no idea why. What's the difference between assertions 3 and 5 ? FYI, ma.masked=ma.MaskedArray(0.,dtype=np.float_,mask=True), and MaskedArray has a __array_priority__ of 15. Implementing a __rmul__ doesn't work either. Any idea welcome. _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
