summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
authorBen Walsh <b@wumpster.com>2011-07-12 16:47:12 +0100
committerMark Wiebe <mwiebe@enthought.com>2011-07-19 14:54:18 -0500
commit1dd8eb73ec89b96d17cfd46dc98aae6d97762832 (patch)
treedb7b292923bae5b9ede095c909ad8bd9d9e5d951 /numpy/core/_internal.py
parentecaf1e1765eb5697a27761b49a25081b1fffb90d (diff)
downloadnumpy-1dd8eb73ec89b96d17cfd46dc98aae6d97762832.tar.gz
BUG: datetime: Various fixes for datetime arrays.
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r--numpy/core/_internal.py7
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])