summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_multiarray.py14
-rw-r--r--numpy/matrx/tests/test_multiarray.py16
2 files changed, 16 insertions, 14 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 57f1bd4c6..75c97d224 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -1031,20 +1031,6 @@ class TestView(TestCase):
assert_array_equal(y, z)
assert_array_equal(y, [67305985, 134678021])
- def test_type(self):
- x = np.array([1,2,3])
- assert(isinstance(x.view(np.matrix),np.matrix))
-
- def test_keywords(self):
- x = np.array([(1,2)],dtype=[('a',np.int8),('b',np.int8)])
- # We must be specific about the endianness here:
- y = x.view(dtype='<i2', type=np.matrix)
- assert_array_equal(y,[[513]])
-
- assert(isinstance(y,np.matrix))
- assert_equal(y.dtype, np.dtype('<i2'))
-
-
class TestStats(TestCase):
def test_subclass(self):
class TestArray(np.ndarray):
diff --git a/numpy/matrx/tests/test_multiarray.py b/numpy/matrx/tests/test_multiarray.py
new file mode 100644
index 000000000..9f2dce7e4
--- /dev/null
+++ b/numpy/matrx/tests/test_multiarray.py
@@ -0,0 +1,16 @@
+import numpy as np
+from numpy.testing import *
+
+class TestView(TestCase):
+ def test_type(self):
+ x = np.array([1,2,3])
+ assert(isinstance(x.view(np.matrix),np.matrix))
+
+ def test_keywords(self):
+ x = np.array([(1,2)],dtype=[('a',np.int8),('b',np.int8)])
+ # We must be specific about the endianness here:
+ y = x.view(dtype='<i2', type=np.matrix)
+ assert_array_equal(y,[[513]])
+
+ assert(isinstance(y,np.matrix))
+ assert_equal(y.dtype, np.dtype('<i2'))