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

numpy-svn@scip... numpy-svn@scip...
Thu Aug 28 21:29:00 CDT 2008


Author: cdavid
Date: 2008-08-28 21:28:52 -0500 (Thu, 28 Aug 2008)
New Revision: 5721

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add a regression test to show #771 failure.


Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2008-08-29 01:29:30 UTC (rev 5720)
+++ trunk/numpy/core/tests/test_regression.py	2008-08-29 02:28:52 UTC (rev 5721)
@@ -843,6 +843,12 @@
         """Ticket #658"""
         np.indices((0,3,4)).T.reshape(-1,3)
 
+    def test_copy_detection_corner_case2(self, level=rlevel):
+        """Ticket #771: strides are not set correctly when reshaping 0-sized
+        arrays"""
+        b = np.indices((0,3,4)).T.reshape(-1,3)
+        assert_equal(b.strides, (24, 4))
+
     def test_object_array_refcounting(self, level=rlevel):
         """Ticket #633"""
         if not hasattr(sys, 'getrefcount'):



More information about the Numpy-svn mailing list