import numpy as np import numpy.ma as ma # There is no effect on the following assignment of ma.masked. a1 = ma.arange(10).reshape((2,5)) a1.ravel()[np.array([0,2,2])] = ma.masked
# The following works: a1 = ma.arange(10) a1[np.array([0,2,2])] = ma.masked a1.shape = 2,5 -- View this message in context: http://www.nabble.com/assigning-ma.masked.-Strange-behavior-tp24336615p24336615.html Sent from the Numpy-discussion mailing list archive at Nabble.com. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion