summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-02-09 08:55:38 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-02-09 08:55:38 +0000
commit622e6867a9b500d30333d157eaffdf44d3c52fe1 (patch)
treed9eeefc4a023ead32d8b14a6efd0fddb0cf80075 /numpy/core/arrayprint.py
parente4df04ac07a6442d711a34cfa64d64c033f4f1a8 (diff)
downloadnumpy-622e6867a9b500d30333d157eaffdf44d3c52fe1.tar.gz
Fixed bug in unicode change.
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r--numpy/core/arrayprint.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index c22580cf9..4e5db082a 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -164,6 +164,9 @@ def _array2string(a, max_line_width, precision, suppress_small, separator=' ',
data.imag, precision, suppress_small, sign=1)
format_function = lambda x, f1 = real_format, f2 = imag_format: \
_formatComplex(x, f1, f2)
+ elif issubclass(dtype, _nt.unicode_):
+ format = "%s"
+ format_function = lambda x, f = format: repr(x)
else:
format = '%s'
format_function = lambda x, f = format: format % str(x)