[Numpy-svn] r3491 - trunk/numpy/lib/tests

numpy-svn at scipy.org numpy-svn at scipy.org
Sun Dec 24 03:02:57 CST 2006


Author: oliphant
Date: 2006-12-24 03:02:34 -0600 (Sun, 24 Dec 2006)
New Revision: 3491

Modified:
   trunk/numpy/lib/tests/test_ufunclike.py
Log:
Fix tests for Boolean.

Modified: trunk/numpy/lib/tests/test_ufunclike.py
===================================================================
--- trunk/numpy/lib/tests/test_ufunclike.py	2006-12-23 13:56:35 UTC (rev 3490)
+++ trunk/numpy/lib/tests/test_ufunclike.py	2006-12-24 09:02:34 UTC (rev 3491)
@@ -18,9 +18,9 @@
 Test isposinf, isneginf, sign
 >>> a = nx.array([nx.Inf, -nx.Inf, nx.NaN, 0.0, 3.0, -3.0])
 >>> U.isposinf(a)
-array([True, False, False, False, False, False], dtype=bool)
+array([ True, False, False, False, False, False], dtype=bool)
 >>> U.isneginf(a)
-array([False, True, False, False, False, False], dtype=bool)
+array([False,  True, False, False, False, False], dtype=bool)
 >>> olderr = nx.seterr(invalid='ignore')
 >>> nx.sign(a)
 array([ 1., -1.,  0.,  0.,  1., -1.])
@@ -29,19 +29,19 @@
 Same thing with an output array:
 >>> y = nx.zeros(a.shape, bool)
 >>> U.isposinf(a, y)
-array([True, False, False, False, False, False], dtype=bool)
+array([ True, False, False, False, False, False], dtype=bool)
 >>> y
-array([True, False, False, False, False, False], dtype=bool)
+array([ True, False, False, False, False, False], dtype=bool)
 >>> U.isneginf(a, y)
-array([False, True, False, False, False, False], dtype=bool)
+array([False,  True, False, False, False, False], dtype=bool)
 >>> y
-array([False, True, False, False, False, False], dtype=bool)
+array([False,  True, False, False, False, False], dtype=bool)
 >>> olderr = nx.seterr(invalid='ignore')
 >>> nx.sign(a, y)
-array([True, True, False, False, True, True], dtype=bool)
+array([ True,  True, False, False,  True,  True], dtype=bool)
 >>> olderr = nx.seterr(**olderr)
 >>> y
-array([True, True, False, False, True, True], dtype=bool)
+array([ True,  True, False, False,  True,  True], dtype=bool)
 
 Now log2:
 >>> a = nx.array([4.5, 2.3, 6.5])



More information about the Numpy-svn mailing list