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

numpy-svn@scip... numpy-svn@scip...
Tue Sep 2 01:59:51 CDT 2008


Author: cdavid
Date: 2008-09-02 01:59:43 -0500 (Tue, 02 Sep 2008)
New Revision: 5741

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Fix regression test #771 on 64 bits architecture.

The test assumed an item was 4 bytes. Use itemsize instead of harcoding 4 bytes
per item.


Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2008-09-01 13:07:30 UTC (rev 5740)
+++ trunk/numpy/core/tests/test_regression.py	2008-09-02 06:59:43 UTC (rev 5741)
@@ -847,7 +847,7 @@
         """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, (12, 4))
+        assert_equal(b.strides, (3 * b.itemsize, b.itemsize))
 
     def test_object_array_refcounting(self, level=rlevel):
         """Ticket #633"""



More information about the Numpy-svn mailing list