diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-02 22:48:14 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-02 22:48:14 +0000 |
commit | 5c876be793ddfee6da8bb4c0a1bd5b64bf1d5a97 (patch) | |
tree | abca2a1bf00f0acd592384281094da76e1c8973b /numpy/core/numeric.py | |
parent | d0791f7ade3b1d6d2673c0de93d58e0a3e225b4e (diff) | |
download | numpy-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.py | 5 |
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) |