NumPy

Previous topic

numpy.ma.MaskedArray.__reduce__

Next topic

numpy.ma.MaskedArray.__new__

This is documentation for an old release of NumPy (version 1.18). Read this page in the documentation of the latest stable release (version 2.2).

numpy.ma.MaskedArray.__setstate__

method

MaskedArray.__setstate__(self, state)[source]

Restore the internal state of the masked array, for pickling purposes. state is typically the output of the __getstate__ output, and is a 5-tuple:

  • class name

  • a tuple giving the shape of the data

  • a typecode for the data

  • a binary string for the data

  • a binary string for the mask.