diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-02-09 05:26:03 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-02-09 05:26:03 +0000 |
commit | fc7ac38dec262117bbc30698e0696e9911369207 (patch) | |
tree | dcbaf3acc96cb207647f2f5b9dcd2b378bbe5deb /numpy/core/numeric.py | |
parent | f1bffaafc8e94cb5e1e94bd0527410108903669c (diff) | |
download | numpy-fc7ac38dec262117bbc30698e0696e9911369207.tar.gz |
Fixed reference count problems.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 35aeff94b..103239a2f 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -237,7 +237,11 @@ def array_repr(arr, max_line_width=None, precision=None, suppress_small=None): if issubclass(arr.dtype.type, flexible): if typename not in ['unicode','string','void']: typename = arr.dtype.type.__name__ - typename = "(%s,%d)" % (typename, arr.itemsize) + if typename == 'unicode': + size = arr.itemsize >> 2 + else: + size = arr.itemsize; + typename = "(%s,%d)" % (typename, size) return cName + "(%s, dtype=%s)" % (lst, typename) def array_str(a, max_line_width=None, precision=None, suppress_small=None): |