# [Numpy-svn] r3134 - trunk/numpy/core/tests

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Sep 7 18:52:50 CDT 2006

Author: stefan
Date: 2006-09-07 18:52:34 -0500 (Thu, 07 Sep 2006)
New Revision: 3134

Modified:
trunk/numpy/core/tests/test_regression.py
Log:
Tests for tickets #254 and #270.

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2006-09-07 22:43:47 UTC (rev 3133)
+++ trunk/numpy/core/tests/test_regression.py	2006-09-07 23:52:34 UTC (rev 3134)
@@ -352,6 +352,14 @@
"""Lexsort memory error"""
v = N.array([1,2,3,4,5,6,7,8,9,10])
assert_equal(N.lexsort(v),0)
+
+        """Ticket #254"""
+        a = N.ma.zeros((4,1))
+        b = N.zeros((4,2))
+        a*b
+        b*a

def check_swap_real(self, level=rlevel):
"""Ticket #265"""
@@ -359,7 +367,11 @@
assert_equal(N.arange(4,dtype='<c8').imag.max(),0.0)
assert_equal(N.arange(4,dtype='>c8').real.max(),3.0)
assert_equal(N.arange(4,dtype='<c8').real.max(),3.0)
-
+
+    def check_object_array_from_list(self, level=rlevel):
+        """Ticket #270"""
+        a = N.array([1,'A',None])
+
"""Ticket #271"""
@@ -367,7 +379,10 @@
def check_multiple_assign(self, level=rlevel):
"""Ticket #273"""
a = N.zeros((3,1),int)
-        a[[1,2]] = 1
-
+        a[[1,2]] = 1
+
+    def check_empty_array_type(self, level=rlevel):
+        assert_equal(N.array([]).dtype, N.zeros(0).dtype)
+
if __name__ == "__main__":
NumpyTest().run()