diff options
author | gfyoung <gfyoung17@gmail.com> | 2016-02-18 10:03:30 +0000 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2016-02-19 18:37:12 +0000 |
commit | ed527cd7b28a76c8ecb2bd0e32a74a03767916bb (patch) | |
tree | 8342b011f1c7cd26286975ab8e51a1d8b6ad0c2a /numpy/lib/tests/test_function_base.py | |
parent | bd905a8f0100a9cda21b1933676ef36ad213e879 (diff) | |
download | numpy-ed527cd7b28a76c8ecb2bd0e32a74a03767916bb.tar.gz |
BUG: Preserve array order in np.delete
Closes gh-7113.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index cd126fe71..782c1399a 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -533,6 +533,16 @@ class TestDelete(TestCase): assert_(isinstance(delete(a, slice(1, 2)), SubClass)) assert_(isinstance(delete(a, slice(1, -2)), SubClass)) + def test_array_order_preserve(self): + # See gh-7113 + k = np.arange(10).reshape(2, 5, order='F') + m = delete(k, slice(60, None), axis=1) + + # 'k' is Fortran ordered, and 'm' should have the + # same ordering as 'k' and NOT become C ordered + assert_equal(m.flags.c_contiguous, k.flags.c_contiguous) + assert_equal(m.flags.f_contiguous, k.flags.f_contiguous) + class TestGradient(TestCase): |