diff options
author | Anas Khan <anas.khan96@outlook.com> | 2018-01-09 23:55:32 +0530 |
---|---|---|
committer | Anas Khan <anas.khan96@outlook.com> | 2018-01-09 23:55:32 +0530 |
commit | 19ac9ee366a911d7765ab9a2831d4bf8076a9e31 (patch) | |
tree | fa4df6ac6f7967cccadc311467ba4f9086fae29e /numpy/ma/tests/test_extras.py | |
parent | abb17d31e0f92f9e291a1a5b4f70742940287af8 (diff) | |
download | python-numpy-19ac9ee366a911d7765ab9a2831d4bf8076a9e31.tar.gz python-numpy-19ac9ee366a911d7765ab9a2831d4bf8076a9e31.tar.bz2 python-numpy-19ac9ee366a911d7765ab9a2831d4bf8076a9e31.zip |
adding new tests for union1d
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r-- | numpy/ma/tests/test_extras.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py index 7687514fa..1d93da1a3 100644 --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -1510,6 +1510,12 @@ class TestArraySetOps(object): test = union1d(a, b) control = array([1, 2, 3, 4, 5, 7, -1], mask=[0, 0, 0, 0, 0, 0, 1]) assert_equal(test, control) + + x = array([[0, 1, 2], [3, 4, 5]], mask=[[0, 0, 0], [0, 0, 1]]) + y = array([0, 1, 2, 3, 4], mask=[0, 0, 0, 0, 1]) + ez = array([0, 1, 2, 3, 4, 5], mask=[0, 0, 0, 0, 0, 1]) + z = union1d(x, y) + assert_equal(z, ez) # assert_array_equal([], union1d([], [])) |