From f801f76096136fdb9b261df5d8cde5adcaf134d5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 4 Dec 2016 21:40:27 -0500 Subject: TST: Ellipsis indexing creates a view. It used to be the case that one would get the exact same object back. However, since 1.9 this is no longer the case. Therefore we clean out this outdated comment and add an `is` test to make it clearer this is the case. --- numpy/core/tests/test_indexing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy') diff --git a/numpy/core/tests/test_indexing.py b/numpy/core/tests/test_indexing.py index 5587b407b..55eeb694a 100644 --- a/numpy/core/tests/test_indexing.py +++ b/numpy/core/tests/test_indexing.py @@ -141,10 +141,10 @@ class TestIndexing(TestCase): assert_raises(IndexError, a.__getitem__, b) def test_ellipsis_index(self): - # Ellipsis index does not create a view a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) + assert_(a[...] is not a) assert_equal(a[...], a) # `a[...]` was `a` in numpy <1.9. assert_(a[...].base is a) -- cgit v1.2.1