[Numpy-svn] r6264 - in branches/fix_float_format: . numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Tue Dec 30 00:03:08 CST 2008


Author: cdavid
Date: 2008-12-30 00:03:04 -0600 (Tue, 30 Dec 2008)
New Revision: 6264

Modified:
   branches/fix_float_format/
   branches/fix_float_format/numpy/core/tests/test_print.py
Log:
Merged revisions 6263 via svnmerge from 
http://svn.scipy.org/svn/numpy/trunk

........
  r6263 | cdavid | 2008-12-30 15:01:31 +0900 (Tue, 30 Dec 2008) | 1 line
  
  More fixes for print tests.
........



Property changes on: branches/fix_float_format
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/distutils-revamp:1-2752 /branches/dynamic_cpu_configuration:1-6101 /branches/multicore:1-3687 /branches/numpy-mingw-w64:1-6150 /branches/visualstudio_manifest:1-6077 /trunk:1-6244,6251,6253,6256,6258,6260-6261
   + /branches/distutils-revamp:1-2752 /branches/dynamic_cpu_configuration:1-6101 /branches/multicore:1-3687 /branches/numpy-mingw-w64:1-6150 /branches/visualstudio_manifest:1-6077 /trunk:1-6244,6251,6253,6256,6258,6260-6261,6263

Modified: branches/fix_float_format/numpy/core/tests/test_print.py
===================================================================
--- branches/fix_float_format/numpy/core/tests/test_print.py	2008-12-30 06:01:31 UTC (rev 6263)
+++ branches/fix_float_format/numpy/core/tests/test_print.py	2008-12-30 06:03:04 UTC (rev 6264)
@@ -5,9 +5,17 @@
 import sys
 from StringIO import StringIO
 
-_REF = {np.inf: 'inf', -np.inf: '-inf', np.nan: 'nan', complex(np.inf, 1):
-        '(inf+1j)', complex(np.nan, 1): '(nan+1j)', complex(-np.inf, 1):
-        '(-inf+1j)'}
+_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)'
+        }
 
 if sys.platform == 'win32' and sys.version_info[0] <= 2 and sys.version_info[1] <= 5:
     _REF[np.float32(1e10)] = '1e+010'
@@ -89,8 +97,8 @@
         sys.stdout = file_tp
         print tp(x)
         sys.stdout = file
-        if x in _REF:
-            print _REF[x]
+        if tp(x) in _REF:
+            print _REF[tp(x)]
         else:
             print x
     finally:



More information about the Numpy-svn mailing list