summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 63cb264b1..66a6e3a04 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -425,7 +425,10 @@ def array_repr(arr, max_line_width=None, precision=None, suppress_small=None):
typename=arr.dtype.name
lf = ''
if issubclass(arr.dtype.type, flexible):
- typename = "'%s'" % str(arr.dtype)
+ if arr.dtype.names:
+ typename = "%s" % str(arr.dtype)
+ else:
+ typename = "'%s'" % str(arr.dtype)
lf = '\n'+' '*len("array(")
return cName + "(%s, %sdtype=%s)" % (lst, lf, typename)