summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraysetops.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r--numpy/lib/tests/test_arraysetops.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py
index ae98884d6..36b53c8e6 100644
--- a/numpy/lib/tests/test_arraysetops.py
+++ b/numpy/lib/tests/test_arraysetops.py
@@ -21,6 +21,8 @@ class test_aso(NumpyTestCase):
ec = numpy.array( [1, 2, 5, 7] )
c = unique1d( a )
assert_array_equal( c, ec )
+
+ assert_array_equal([], unique1d([]))
##
# 03.11.2005, c
@@ -32,6 +34,8 @@ class test_aso(NumpyTestCase):
ec = numpy.array( [1, 2, 5] )
c = intersect1d( a, b )
assert_array_equal( c, ec )
+
+ assert_array_equal([], intersect1d([],[]))
##
# 03.11.2005, c
@@ -43,6 +47,8 @@ class test_aso(NumpyTestCase):
ec = numpy.array( [1, 2, 5] )
c = intersect1d_nu( a, b )
assert_array_equal( c, ec )
+
+ assert_array_equal([], intersect1d_nu([],[]))
##
# 03.11.2005, c
@@ -68,6 +74,8 @@ class test_aso(NumpyTestCase):
ec = numpy.array( [1, 2, 3, 4, 5, 6] )
c = setxor1d( a, b )
assert_array_equal( c, ec )
+
+ assert_array_equal([], setxor1d([],[]))
def check_ediff1d(self):
zero_elem = numpy.array([])
@@ -101,6 +109,8 @@ class test_aso(NumpyTestCase):
ec = numpy.array( [True, False, True, False] )
c = setmember1d( a, b )
assert_array_equal( c, ec )
+
+ assert_array_equal([], setmember1d([],[]))
##
# 03.11.2005, c
@@ -112,6 +122,8 @@ class test_aso(NumpyTestCase):
ec = numpy.array( [1, 2, 3, 4, 5, 7] )
c = union1d( a, b )
assert_array_equal( c, ec )
+
+ assert_array_equal([], union1d([],[]))
##
# 03.11.2005, c
@@ -130,6 +142,8 @@ class test_aso(NumpyTestCase):
ec = numpy.array( [19, 20] )
c = setdiff1d( a, b )
assert_array_equal( c, ec )
+
+ assert_array_equal([], setdiff1d([],[]))
##