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

numpy-svn@scip... numpy-svn@scip...
Mon Mar 12 12:07:28 CDT 2007


Author: stefan
Date: 2007-03-12 12:07:19 -0500 (Mon, 12 Mar 2007)
New Revision: 3573

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add test for ticket #449.


Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2007-03-07 19:12:26 UTC (rev 3572)
+++ trunk/numpy/core/tests/test_regression.py	2007-03-12 17:07:19 UTC (rev 3573)
@@ -608,7 +608,7 @@
         todivide = N.array([2.0, 0.5, 0.25])
         assert_equal(N.subtract.reduce(tosubtract), -10)
         assert_equal(N.divide.reduce(todivide), 16.0)
-        assert_array_equal(N.subtract.accumulate(tosubtract), 
+        assert_array_equal(N.subtract.accumulate(tosubtract),
             N.array([0, -1, -3, -6, -10]))
         assert_array_equal(N.divide.accumulate(todivide),
             N.array([2., 4., 16.]))
@@ -622,6 +622,12 @@
         self.failUnlessRaises(AssertionError,N.convolve,[],[1])
         self.failUnlessRaises(AssertionError,N.convolve,[1],[])
 
+    def check_multidim_byteswap(self, level=rlevel):
+        """Ticket #449"""
+        r=N.array([(1,(0,1,2))], dtype="i2,3i2")
+        assert_array_equal(r.byteswap(),
+                           N.array([(256,(0,256,512))],r.dtype))
+
     def check_string_NULL(self, level=rlevel):
         """Changeset 3557"""
         assert_equal(N.array("a\x00\x0b\x0c\x00").item(),



More information about the Numpy-svn mailing list