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

numpy-svn@scip... numpy-svn@scip...
Mon Apr 14 16:47:02 CDT 2008


Author: rkern
Date: 2008-04-14 16:46:55 -0500 (Mon, 14 Apr 2008)
New Revision: 5035

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Test for r5034.

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2008-04-14 20:46:55 UTC (rev 5034)
+++ trunk/numpy/core/tests/test_regression.py	2008-04-14 21:46:55 UTC (rev 5035)
@@ -1000,6 +1000,19 @@
                      "('bottom', [('bleft', ('>f4', (8, 64)), (1,)), "
                      "('bright', '>f4', (8, 36))])]")
 
+    def check_nonnative_endian_fill(self, level=rlevel):
+        """ Non-native endian arrays were incorrectly filled with scalars before
+        r5034.
+        """
+        if sys.byteorder == 'little':
+            dtype = np.dtype('>i4')
+        else:
+            dtype = np.dtype('<i4')
+        x = np.empty([1], dtype=dtype)
+        x.fill(1)
+        assert_equal(x, np.array([1], dtype=dtype))
 
+
+
 if __name__ == "__main__":
     NumpyTest().run()



More information about the Numpy-svn mailing list