summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-02-09 05:26:03 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-02-09 05:26:03 +0000
commitfc7ac38dec262117bbc30698e0696e9911369207 (patch)
treedcbaf3acc96cb207647f2f5b9dcd2b378bbe5deb /numpy/core/numeric.py
parentf1bffaafc8e94cb5e1e94bd0527410108903669c (diff)
downloadnumpy-fc7ac38dec262117bbc30698e0696e9911369207.tar.gz
Fixed reference count problems.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py6
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):