diff options
author | pierregm <pierregm@localhost> | 2009-12-19 20:08:16 +0000 |
---|---|---|
committer | pierregm <pierregm@localhost> | 2009-12-19 20:08:16 +0000 |
commit | 55ab10cd15e165dbf129079846adaf3961b527fd (patch) | |
tree | 3984d0cf7e1107fb0eed3abdb2dc943032b5113a /numpy/ma/core.py | |
parent | e700c55fa7ce25128359b843e8913311841dd855 (diff) | |
download | numpy-55ab10cd15e165dbf129079846adaf3961b527fd.tar.gz |
* make sure mvoid.tolist returns standard Python objects
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r-- | numpy/ma/core.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 25050f651..de8512831 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -5387,7 +5387,9 @@ class MaskedArray(ndarray): self.dtype, self.flags.fnc, self._data.tostring(cf), + #self._data.tolist(), getmaskarray(self).tostring(cf), + #getmaskarray(self).tolist(), self._fill_value, ) return state @@ -5546,7 +5548,8 @@ class mvoid(MaskedArray): if m: result.append(None) else: - result.append(d) + # .item() makes sure we return a standard Python object + result.append(d.item()) return tuple(result) |