summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2007-01-08 21:56:54 +0000
committerStefan van der Walt <stefan@sun.ac.za>2007-01-08 21:56:54 +0000
commit1bd2d49ef378fb869d015cef32c3e44a4c03a8f0 (patch)
tree43335baf1da0b6e9de0ad806e721a077e3cbfa45 /numpy/lib/tests/test_function_base.py
parent98b6d48b07f4eadfb7d1fc41483debe7e07eecd6 (diff)
downloadnumpy-1bd2d49ef378fb869d015cef32c3e44a4c03a8f0.tar.gz
Whitespace cleanup.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py25
1 files changed, 12 insertions, 13 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index c3eaa9dd2..58f73ec5f 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1,4 +1,3 @@
-
import sys
from numpy.testing import *
@@ -93,7 +92,7 @@ class test_linspace(NumpyTestCase):
t3 = linspace(0,1,2).dtype
assert_equal(t1, t2)
assert_equal(t2, t3)
-
+
class test_insert(NumpyTestCase):
def check_basic(self):
a = [1,2,3]
@@ -276,23 +275,23 @@ class test_vectorize(NumpyTestCase):
f = vectorize(addsubtract)
r = f([0,3,6,9],5)
assert_array_equal(r,[5,8,1,4])
- def check_large(self):
- x = linspace(-3,2,10000)
- f = vectorize(lambda x: x)
- y = f(x)
- assert_array_equal(y, x)
+ def check_large(self):
+ x = linspace(-3,2,10000)
+ f = vectorize(lambda x: x)
+ y = f(x)
+ assert_array_equal(y, x)
class test_digitize(NumpyTestCase):
def check_forward(self):
x = arange(-6,5)
bins = arange(-5,5)
assert_array_equal(digitize(x,bins),arange(11))
-
+
def check_reverse(self):
x = arange(5,-6,-1)
bins = arange(5,-5,-1)
assert_array_equal(digitize(x,bins),arange(11))
-
+
def check_random(self):
x = rand(10)
bin = linspace(x.min(), x.max(), 10)
@@ -378,12 +377,12 @@ class test_histogramdd(NumpyTestCase):
# Check that a sequence of arrays is accepted and H has the correct shape.
z = [squeeze(y) for y in split(x,3,axis=1)]
H, edges = histogramdd(z, bins=(4,3,2),range=[[-2,2], [0,3], [0,2]])
- answer = asarray([[[0,0],[0,0],[0,0]],
- [[0,1], [0,0], [1,0]],
- [[0,1], [0,0],[0,0]],
+ answer = asarray([[[0,0],[0,0],[0,0]],
+ [[0,1], [0,0], [1,0]],
+ [[0,1], [0,0],[0,0]],
[[0,0],[0,0],[0,0]]])
assert_array_equal(H, answer)
-
+
class test_unique(NumpyTestCase):
def check_simple(self):