summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r--numpy/core/_internal.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
index 87b41e517..b89c94d9b 100644
--- a/numpy/core/_internal.py
+++ b/numpy/core/_internal.py
@@ -87,7 +87,8 @@ def _array_descr(descriptor):
return descriptor.str
else:
new = descriptor.metadata.copy()
- del new[METADATA_DTSTR]
+ # Eliminate any key related to internal implementation
+ _ = new.pop(METADATA_DTSTR, None)
return (descriptor.str, new)
else:
return (_array_descr(subdtype[0]), subdtype[1])