From 04102657b2348c02fe3b870d7fb6b9e941de16d8 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sun, 24 Dec 2006 09:02:34 +0000 Subject: [PATCH] Fix tests for Boolean. --- numpy/lib/tests/test_ufunclike.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/numpy/lib/tests/test_ufunclike.py b/numpy/lib/tests/test_ufunclike.py index 2d02d12208a3..8f9ac2833482 100644 --- a/numpy/lib/tests/test_ufunclike.py +++ b/numpy/lib/tests/test_ufunclike.py @@ -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])