Hi,

I use masked arrays to mark missing values in data and found it very
convenient, although sometimes counterintuitive.

I'd like to make a pool of masked arrays (shared between several
processing steps) read-only (both data and mask property) to protect
the arrays from accidental modification (and the array users from
hours of debugging). The regular ndarray trick

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).

Could you recommend an easy way to set an ma read-only?

Thanks,
Gregorio
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to