diff options
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index 99e64d475..e46e1441a 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -90,8 +90,11 @@ def _array_descr(descriptor): else: new = descriptor.metadata.copy() # Eliminate any key related to internal implementation - _ = new.pop(METADATA_DTSTR, None) - return (descriptor.str, new) + new.pop(METADATA_DTSTR, None) + if new: + return (descriptor.str, new) + else: + return descriptor.str else: return (_array_descr(subdtype[0]), subdtype[1]) |