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
BTW, this timing on a core 2 Duo 2.0GH laptop ,with the Enthought Python
Distribution, is around 0.2 second.
Ben Park wrote:
>
> I have spent many hours trying to do this, to no avail. The numpy
> installation I got didn't seem to link to the MKL library. A 1000x1000
> matr