[Numpy-svn] r3393 - trunk/numpy/core/tests

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Oct 25 01:21:10 CDT 2006


Author: oliphant
Date: 2006-10-25 01:21:04 -0500 (Wed, 25 Oct 2006)
New Revision: 3393

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add test for recent bug in indexing optimization.

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2006-10-25 06:15:40 UTC (rev 3392)
+++ trunk/numpy/core/tests/test_regression.py	2006-10-25 06:21:04 UTC (rev 3393)
@@ -543,7 +543,12 @@
         """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()



More information about the Numpy-svn mailing list