diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-09-27 22:46:11 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-09-27 22:46:11 +0000 |
commit | 74b68e37a478ca5d6e515196af1108e9494a01f1 (patch) | |
tree | 3e1f0cf64a4803ec45270b66fd748f69213e8612 /numpy/core/arrayprint.py | |
parent | 92d3aafb23899c1c7f959d16c08ca3274f315223 (diff) | |
download | numpy-74b68e37a478ca5d6e515196af1108e9494a01f1.tar.gz |
Add quotes to printing strings.
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index e33e5a969..50ae4fb26 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -169,7 +169,8 @@ def _array2string(a, max_line_width, precision, suppress_small, separator=' ', data.imag, precision, suppress_small, sign=1) format_function = lambda x: \ _formatComplex(x, real_format, imag_format) - elif issubclass(dtype, _nt.unicode_): + elif issubclass(dtype, _nt.unicode_) or \ + issubclass(dtype, _nt.string_): format = "%s" format_function = lambda x: repr(x) else: |