Return the internal state of the masked array. This is for pickling.
(self)
| 439 | return result.tolist() |
| 440 | |
| 441 | def __getstate__(self): |
| 442 | """Return the internal state of the masked array. |
| 443 | |
| 444 | This is for pickling. |
| 445 | |
| 446 | """ |
| 447 | state = (1, |
| 448 | self.shape, |
| 449 | self.dtype, |
| 450 | self.flags.fnc, |
| 451 | self._data.tobytes(), |
| 452 | self._mask.tobytes(), |
| 453 | self._fill_value, |
| 454 | ) |
| 455 | return state |
| 456 | |
| 457 | def __setstate__(self, state): |
| 458 | """ |