diff options
author | Stephan Hoyer <shoyer@gmail.com> | 2018-10-25 12:46:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 12:46:24 -0700 |
commit | 2dfb68ef3de5d6fcb9451462d38352f411f055c0 (patch) | |
tree | a80dd8a65b6f796e7e00b678071e37d3bc8e293c /numpy/lib/tests/test_arraysetops.py | |
parent | ea7ff5fd7a3300a1d1c68c3f8d773f9ce4f17ca4 (diff) | |
parent | 872372bd56ccb5fe98faae8be7d14e4a8c69e037 (diff) | |
download | numpy-2dfb68ef3de5d6fcb9451462d38352f411f055c0.tar.gz |
Merge branch 'master' into einsum-dispatch
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r-- | numpy/lib/tests/test_arraysetops.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py index 4b61726d2..fef06ba53 100644 --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -388,6 +388,13 @@ class TestSetOps(object): a = np.array((), np.uint32) assert_equal(setdiff1d(a, []).dtype, np.uint32) + def test_setdiff1d_unique(self): + a = np.array([3, 2, 1]) + b = np.array([7, 5, 2]) + expected = np.array([3, 1]) + actual = setdiff1d(a, b, assume_unique=True) + assert_equal(actual, expected) + def test_setdiff1d_char_array(self): a = np.array(['a', 'b', 'c']) b = np.array(['a', 'b', 's']) |