diff options
Diffstat (limited to 'numpy/tests/test_matlib.py')
-rw-r--r-- | numpy/tests/test_matlib.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/numpy/tests/test_matlib.py b/numpy/tests/test_matlib.py index 11227b19a..d16975934 100644 --- a/numpy/tests/test_matlib.py +++ b/numpy/tests/test_matlib.py @@ -28,10 +28,19 @@ def test_identity(): assert_array_equal(x, np.matrix([[1, 0], [0, 1]])) def test_eye(): - x = numpy.matlib.eye(3, k=1, dtype=int) - assert_array_equal(x, np.matrix([[ 0, 1, 0], - [ 0, 0, 1], - [ 0, 0, 0]])) + xc = numpy.matlib.eye(3, k=1, dtype=int) + assert_array_equal(xc, np.matrix([[ 0, 1, 0], + [ 0, 0, 1], + [ 0, 0, 0]])) + assert xc.flags.c_contiguous + assert not xc.flags.f_contiguous + + xf = numpy.matlib.eye(3, 4, dtype=int, order='F') + assert_array_equal(xf, np.matrix([[ 1, 0, 0, 0], + [ 0, 1, 0, 0], + [ 0, 0, 1, 0]])) + assert not xf.flags.c_contiguous + assert xf.flags.f_contiguous def test_rand(): x = numpy.matlib.rand(3) |