summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraysetops.py
diff options
context:
space:
mode:
authorAnas Khan <anas.khan96@outlook.com>2018-01-09 23:55:32 +0530
committerAnas Khan <anas.khan96@outlook.com>2018-01-09 23:55:32 +0530
commit19ac9ee366a911d7765ab9a2831d4bf8076a9e31 (patch)
treefa4df6ac6f7967cccadc311467ba4f9086fae29e /numpy/lib/tests/test_arraysetops.py
parentabb17d31e0f92f9e291a1a5b4f70742940287af8 (diff)
downloadnumpy-19ac9ee366a911d7765ab9a2831d4bf8076a9e31.tar.gz
adding new tests for union1d
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r--numpy/lib/tests/test_arraysetops.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py
index b4787838d..ec79600d7 100644
--- a/numpy/lib/tests/test_arraysetops.py
+++ b/numpy/lib/tests/test_arraysetops.py
@@ -247,6 +247,12 @@ class TestSetOps(object):
c = union1d(a, b)
assert_array_equal(c, ec)
+ x = np.array([[0, 1, 2], [3, 4, 5]])
+ y = np.array([0, 1, 2, 3, 4])
+ ez = np.array([0, 1, 2, 3, 4, 5])
+ z = union1d(x, y)
+ assert_array_equal(z, ez)
+
assert_array_equal([], union1d([], []))
def test_setdiff1d(self):