diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-10-25 06:21:04 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-10-25 06:21:04 +0000 |
commit | 75981b8a97760e91295ef8b64148816a897c9b7d (patch) | |
tree | 28b9b006aaa30c2859ab41ef6db835922b2c4f11 | |
parent | 24b485da911fa5b5fe9036ad0b3db341267aee80 (diff) | |
download | numpy-75981b8a97760e91295ef8b64148816a897c9b7d.tar.gz |
Add test for recent bug in indexing optimization.
-rw-r--r-- | numpy/core/tests/test_regression.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py index 929d3aa55..3cfcacec7 100644 --- a/numpy/core/tests/test_regression.py +++ b/numpy/core/tests/test_regression.py @@ -543,7 +543,12 @@ class test_regression(NumpyTestCase): """Ticket #352""" a = N.arange(12).reshape(4,3)[:,2] assert_equal(a.repeat(3), [2,2,2,5,5,5,8,8,8,11,11,11]) - + + def check_array_index(self, level=rlevel): + """Make sure optimization is not called in this case.""" + a = N.array([1,2,3]) + a2 = N.array([[1,2,3]]) + assert_equal(a[N.where(a==3)], a2[N.where(a2==3)]) if __name__ == "__main__": NumpyTest().run() |