diff options
author | David Cournapeau <cournape@gmail.com> | 2009-09-16 07:13:57 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-09-16 07:13:57 +0000 |
commit | 5b6db2f6e37f0630bc696c3878f13687dde54e35 (patch) | |
tree | 00f99ac22aabbacfced51328913ea54a5f874a34 /numpy | |
parent | 0e1ce506589d35e8523f2a28e7c0d38673a18794 (diff) | |
download | numpy-5b6db2f6e37f0630bc696c3878f13687dde54e35.tar.gz |
Do not use eye in numpy.core tests.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_multiarray.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index 75c97d224..8c426bc5f 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -1002,13 +1002,13 @@ class TestFromBuffer(TestCase): class TestResize(TestCase): def test_basic(self): - x = np.eye(3) + x = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) x.resize((5,5)) - assert_array_equal(x.flat[:9],np.eye(3).flat) + assert_array_equal(x.flat[:9],np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]).flat) assert_array_equal(x[9:].flat,0) def test_check_reference(self): - x = np.eye(3) + x = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) y = x self.failUnlessRaises(ValueError,x.resize,(5,1)) |