summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-10-02 22:48:14 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-10-02 22:48:14 +0000
commit5c876be793ddfee6da8bb4c0a1bd5b64bf1d5a97 (patch)
treeabca2a1bf00f0acd592384281094da76e1c8973b /numpy/core/numeric.py
parentd0791f7ade3b1d6d2673c0de93d58e0a3e225b4e (diff)
downloadnumpy-5c876be793ddfee6da8bb4c0a1bd5b64bf1d5a97.tar.gz
Fix bugs: uncaught error, way record data-types print, asbuffer function fixed.
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)