diff options
Diffstat (limited to 'numpy/lib/_iotools.py')
-rw-r--r-- | numpy/lib/_iotools.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/lib/_iotools.py b/numpy/lib/_iotools.py index 595c01d29..644d83d1c 100644 --- a/numpy/lib/_iotools.py +++ b/numpy/lib/_iotools.py @@ -468,6 +468,11 @@ class StringConverter: for val in missing_values: self.missing_values.add(val) else: - self.missing_values = [] # Update the type - self.type = self._getsubdtype(func('0')) + self.missing_values = [] + # Update the type + try: + tester = func('0') + except ValueError: + tester = None + self.type = self._getsubdtype(tester) |