[Numpy-svn] r6268 - trunk/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Tue Dec 30 00:12:29 CST 2008


Author: cdavid
Date: 2008-12-30 00:12:26 -0600 (Tue, 30 Dec 2008)
New Revision: 6268

Modified:
   trunk/numpy/core/tests/test_print.py
Log:
complex scalar arrays cannot be created from real/imag args: wrap init values in a complex.

Modified: trunk/numpy/core/tests/test_print.py
===================================================================
--- trunk/numpy/core/tests/test_print.py	2008-12-30 06:08:15 UTC (rev 6267)
+++ trunk/numpy/core/tests/test_print.py	2008-12-30 06:12:26 UTC (rev 6268)
@@ -6,15 +6,15 @@
 from StringIO import StringIO
 
 _REF = {np.inf: 'inf', -np.inf: '-inf', np.nan: 'nan',
-        np.complex64(np.inf, 1): '(inf+1j)',
-        np.complex64(np.nan, 1): '(nan+1j)',
-        np.complex64(-np.inf, 1): '(-inf+1j)',
-        np.cdouble(np.inf, 1): '(inf+1j)',
-        np.cdouble(np.nan, 1): '(nan+1j)',
-        np.cdouble(-np.inf, 1): '(-inf+1j)',
-        np.clongdouble(np.inf, 1): '(inf+1j)',
-        np.clongdouble(np.nan, 1): '(nan+1j)',
-        np.clongdouble(-np.inf, 1): '(-inf+1j)'
+        np.complex64(complex(np.inf, 1)): '(inf+1j)',
+        np.complex64(complex(np.nan, 1)): '(nan+1j)',
+        np.complex64(complex(-np.inf, 1)): '(-inf+1j)',
+        np.cdouble(complex(np.inf, 1)): '(inf+1j)',
+        np.cdouble(complex(np.nan, 1)): '(nan+1j)',
+        np.cdouble(complex(-np.inf, 1)): '(-inf+1j)',
+        np.clongdouble(complex(np.inf, 1)): '(inf+1j)',
+        np.clongdouble(complex(np.nan, 1)): '(nan+1j)',
+        np.clongdouble(complex(-np.inf, 1)): '(-inf+1j)'
         }
 
 if sys.platform == 'win32' and sys.version_info[0] <= 2 and sys.version_info[1] <= 5:



More information about the Numpy-svn mailing list