July 12, 2013
3:45 p.m.
On Fri, Jul 12, 2013 at 4:41 PM, Gregorio Bastardo <gregorio.bastardo@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