diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-12-01 07:24:21 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-12-01 07:24:21 +0000 |
commit | 9772a6ad0bc0e03318ecaf8714f29e5a58362efa (patch) | |
tree | 8602065a432cfe202c6d40819bcf11d0dc228bdb /scipy/base/numeric.py | |
parent | 158f48745d77993638bfe82fc1bdfddcf24cacbf (diff) | |
download | numpy-9772a6ad0bc0e03318ecaf8714f29e5a58362efa.tar.gz |
Added PyArray_SetField to API. Began code to allow setting the data type with a tuple of (dtype, shape) for better records support.
Diffstat (limited to 'scipy/base/numeric.py')
-rw-r--r-- | scipy/base/numeric.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scipy/base/numeric.py b/scipy/base/numeric.py index f3837f201..9fb40065a 100644 --- a/scipy/base/numeric.py +++ b/scipy/base/numeric.py @@ -235,7 +235,9 @@ def array_repr(arr, max_line_width=None, precision=None, suppress_small=None): else: typename=arr.dtype.__name__[:-8] if issubclass(arr.dtype, flexible): - typename = "%s%d" % (typename, arr.itemsize) + if typename not in ['unicode','string','void']: + typename = arr.dtype.__name__ + typename = "%s%d" % (typename, arr.itemsize) return cName + "(%s, dtype=%s)" % (lst, typename) def array_str(a, max_line_width=None, precision=None, suppress_small=None): |