[Numpy-svn] r3222 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Sep 27 18:46:33 EDT 2006


Author: oliphant
Date: 2006-09-27 17:46:11 -0500 (Wed, 27 Sep 2006)
New Revision: 3222

Modified:
   trunk/numpy/core/arrayprint.py
Log:
Add quotes to printing strings.

Modified: trunk/numpy/core/arrayprint.py
===================================================================
--- trunk/numpy/core/arrayprint.py	2006-09-27 17:40:14 UTC (rev 3221)
+++ trunk/numpy/core/arrayprint.py	2006-09-27 22:46:11 UTC (rev 3222)
@@ -169,7 +169,8 @@
                     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:




More information about the Numpy-svn mailing list