On Fri, Jul 12, 2013 at 4:41 PM, Gregorio Bastardo <gregorio.basta...@gmail.com> wrote: > array.flags.writeable = False > > is perfectly fine, but it does not work on ma-s. Moreover, mask > hardening only protects masked elements, and does not raise error (as > I'd expect).
You probably have to modify the underlying array and mask: x = np.ma.array(...) x.mask.flags.writeable = False x.data.flags.writeable = False Stéfan _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion