diff options
author | Christian Brodbeck <christianmbrodbeck@gmail.com> | 2015-05-06 10:49:41 -0400 |
---|---|---|
committer | Christian Brodbeck <christianmbrodbeck@gmail.com> | 2015-05-07 09:03:16 -0400 |
commit | c05019eda16477f4be99f47755362c07e1acb5b8 (patch) | |
tree | eab1de86ac3332d64f9179750b726b460584d8a7 /numpy/ma/tests/test_extras.py | |
parent | eecb2e3c07f29c0ac991d364a846a2f8293a432a (diff) | |
download | numpy-c05019eda16477f4be99f47755362c07e1acb5b8.tar.gz |
BUG: setdiff1d return dtype
Fixes #5846 (If called with an empty array as first argument, the returned
array had dtype bool instead of the dtype of the input array)
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r-- | numpy/ma/tests/test_extras.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py index b6749ae9e..3c7b95c9e 100644 --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -1109,6 +1109,8 @@ class TestArraySetOps(TestCase): a = arange(10) b = arange(8) assert_equal(setdiff1d(a, b), array([8, 9])) + a = array([], np.uint32, mask=[]) + assert_equal(setdiff1d(a, []).dtype, np.uint32) def test_setdiff1d_char_array(self): # Test setdiff1d_charray |