From 8949fe24c057973ece3940617d396addbcbf3875 Mon Sep 17 00:00:00 2001 From: Mark Wiebe Date: Fri, 20 May 2011 11:40:40 -0500 Subject: ENH: Tighten up dtype parsing in general, to catch some more invalid datetime results There is also a problem with 'O4' and 'O8', which are platform-specific. I changed it to still accept both, but produce a deprecation warning. --- numpy/ma/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/ma') diff --git a/numpy/ma/core.py b/numpy/ma/core.py index bbd855cf8..2cb888d55 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -3527,10 +3527,10 @@ class MaskedArray(ndarray): # convert to object array to make filled work names = self.dtype.names if names is None: - res = self._data.astype("|O8") + res = self._data.astype("O") res[m] = f else: - rdtype = _recursive_make_descr(self.dtype, "|O8") + rdtype = _recursive_make_descr(self.dtype, "O") res = self._data.astype(rdtype) _recursive_printoption(res, m, f) else: -- cgit v1.2.1