From 5c876be793ddfee6da8bb4c0a1bd5b64bf1d5a97 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Mon, 2 Oct 2006 22:48:14 +0000 Subject: Fix bugs: uncaught error, way record data-types print, asbuffer function fixed. --- numpy/core/numeric.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'numpy/core/numeric.py') 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) -- cgit v1.2.1