summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-09-16 07:13:57 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-09-16 07:13:57 +0000
commit5b6db2f6e37f0630bc696c3878f13687dde54e35 (patch)
tree00f99ac22aabbacfced51328913ea54a5f874a34 /numpy
parent0e1ce506589d35e8523f2a28e7c0d38673a18794 (diff)
downloadnumpy-5b6db2f6e37f0630bc696c3878f13687dde54e35.tar.gz
Do not use eye in numpy.core tests.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_multiarray.py6
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))