diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-02-09 08:55:38 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-02-09 08:55:38 +0000 |
commit | 622e6867a9b500d30333d157eaffdf44d3c52fe1 (patch) | |
tree | d9eeefc4a023ead32d8b14a6efd0fddb0cf80075 /numpy/core/arrayprint.py | |
parent | e4df04ac07a6442d711a34cfa64d64c033f4f1a8 (diff) | |
download | numpy-622e6867a9b500d30333d157eaffdf44d3c52fe1.tar.gz |
Fixed bug in unicode change.
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 3 |
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) |