summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2011-04-05 09:30:14 -0600
committerCharles Harris <charlesr.harris@gmail.com>2011-04-05 09:30:14 -0600
commitb48b2d5d73dbeef466d6c0a8b41d65d844d7b264 (patch)
tree3cf2ad8ae31ef53a897c1c86932bd0d37ba7561e /numpy
parent3c338cbb2dbc8e6efd4025371a9baadd1ca9a147 (diff)
downloadnumpy-b48b2d5d73dbeef466d6c0a8b41d65d844d7b264.tar.gz
BUG: Python 2.4 doesn't accept the construction class foo():
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_multiarray.py6
-rw-r--r--numpy/core/tests/test_numeric.py2
-rw-r--r--numpy/core/tests/test_scalarmath.py2
-rw-r--r--numpy/lib/tests/test_twodim_base.py6
-rw-r--r--numpy/linalg/tests/test_linalg.py2
5 files changed, 9 insertions, 9 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 4e7714626..feacffdd6 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -1020,7 +1020,7 @@ class TestClip(TestCase):
assert np.all(x <= 4)
-class TestPutmask():
+class TestPutmask:
def tst_basic(self,x,T,mask,val):
np.putmask(x,mask,val)
assert np.all(x[mask] == T(val))
@@ -1066,7 +1066,7 @@ class TestPutmask():
pass
-class TestTake():
+class TestTake:
def tst_basic(self,x):
ind = range(x.shape[0])
assert_array_equal(x.take(ind, axis=0), x)
@@ -1330,7 +1330,7 @@ class TestIO(object):
in_foreign_locale(self.test_tofile_format)()
-class TestFromBuffer():
+class TestFromBuffer:
def tst_basic(self,buffer,expected,kwargs):
assert_array_equal(np.frombuffer(buffer,**kwargs),expected)
diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py
index 705ea07c2..f46871373 100644
--- a/numpy/core/tests/test_numeric.py
+++ b/numpy/core/tests/test_numeric.py
@@ -1039,7 +1039,7 @@ class TestClip(TestCase):
self.assertTrue(a2 is a)
-class TestAllclose():
+class TestAllclose:
rtol = 1e-5
atol = 1e-8
diff --git a/numpy/core/tests/test_scalarmath.py b/numpy/core/tests/test_scalarmath.py
index 7e249e738..9061e61fc 100644
--- a/numpy/core/tests/test_scalarmath.py
+++ b/numpy/core/tests/test_scalarmath.py
@@ -103,7 +103,7 @@ class TestConversion(TestCase):
# assert_equal( val, val2 )
-class TestRepr():
+class TestRepr:
def _test_type_repr(self, t):
finfo=np.finfo(t)
last_fraction_bit_idx = finfo.nexp + finfo.nmant
diff --git a/numpy/lib/tests/test_twodim_base.py b/numpy/lib/tests/test_twodim_base.py
index 50e286d62..85e76a384 100644
--- a/numpy/lib/tests/test_twodim_base.py
+++ b/numpy/lib/tests/test_twodim_base.py
@@ -277,7 +277,7 @@ def test_tril_indices():
[-10, -10, -10, -10]]) )
-class TestTriuIndices():
+class TestTriuIndices:
def test_triu_indices(self):
iu1 = triu_indices(4)
iu2 = triu_indices(4, 2)
@@ -308,14 +308,14 @@ class TestTriuIndices():
[ 13, 14, 15, -1]]) )
-class TestTrilIndicesFrom():
+class TestTrilIndicesFrom:
def test_exceptions(self):
assert_raises(ValueError, tril_indices_from, np.ones((2,)))
assert_raises(ValueError, tril_indices_from, np.ones((2,2,2)))
assert_raises(ValueError, tril_indices_from, np.ones((2,3)))
-class TestTriuIndicesFrom():
+class TestTriuIndicesFrom:
def test_exceptions(self):
assert_raises(ValueError, triu_indices_from, np.ones((2,)))
assert_raises(ValueError, triu_indices_from, np.ones((2,2,2)))
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
index 0fc5eb80b..cccd51d1f 100644
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -240,7 +240,7 @@ class TestLstsq(LinalgTestCase, LinalgNonsquareTestCase, TestCase):
assert imply(isinstance(b, matrix), isinstance(x, matrix))
assert imply(isinstance(b, matrix), isinstance(residuals, matrix))
-class TestMatrixPower():
+class TestMatrixPower:
R90 = array([[0,1],[-1,0]])
Arb22 = array([[4,-7],[-2,10]])
noninv = array([[1,0],[0,0]])