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

numpy-svn@scip... numpy-svn@scip...
Wed Feb 13 14:37:51 CST 2008


Author: stefan
Date: 2008-02-13 14:37:28 -0600 (Wed, 13 Feb 2008)
New Revision: 4800

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add regression tests for tickets #657 and #658.


Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2008-02-13 09:53:32 UTC (rev 4799)
+++ trunk/numpy/core/tests/test_regression.py	2008-02-13 20:37:28 UTC (rev 4800)
@@ -792,5 +792,15 @@
         y = np.fromstring("\x00\x01\x00\x02", dtype="|S2")
         assert_array_equal(np.sort(x, kind="q"), y)
 
+    def check_copy_detection_zero_dim(self, level=rlevel):
+        """Ticket #658"""
+        np.indices((0,3,4)).T.reshape(-1,3)
+
+    def check_flat_byteorder(self, level=rlevel):
+       """Ticket #657"""
+       x = np.arange(10)
+       assert_array_equal(x.astype('>i4'),x.astype('<i4').flat[:])
+       assert_array_equal(x.astype('>i4').flat[:],x.astype('<i4'))
+
 if __name__ == "__main__":
     NumpyTest().run()



More information about the Numpy-svn mailing list