def __getstate__(self):
"""Return the internal state of the masked array, for pickling
purposes.
"""
cf = 'CF'[self.flags.fnc]
state = (1,
self.shape,
self.dtype,
self.flags.fnc,
self._data.tobytes(cf),
# self._data.tolist(),
getmaskarray(self).tobytes(cf),
# getmaskarray(self).tolist(),
self._fill_value,
)
return state
评论列表
文章目录