diff options
author | Miles Cranmer <miles.cranmer@gmail.com> | 2022-06-22 23:06:34 +0000 |
---|---|---|
committer | Miles Cranmer <miles.cranmer@gmail.com> | 2022-06-22 23:06:34 +0000 |
commit | 1d3bdd15f6c12874e6d659a87aed21d58ebd272a (patch) | |
tree | 00217aa5746106153ddf6f0ddbb94d6e06eba74d /numpy/lib/tests/test_arraysetops.py | |
parent | 3b117e7e8c0f9a84185181a7fdbb7e4de979f0ec (diff) | |
download | numpy-1d3bdd15f6c12874e6d659a87aed21d58ebd272a.tar.gz |
TST: Skip empty arrays for kind="table"
Diffstat (limited to 'numpy/lib/tests/test_arraysetops.py')
-rw-r--r-- | numpy/lib/tests/test_arraysetops.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py index 26bf82b33..d91d36282 100644 --- a/numpy/lib/tests/test_arraysetops.py +++ b/numpy/lib/tests/test_arraysetops.py @@ -232,10 +232,11 @@ class TestSetOps: assert_isin_equal(5, 6) # empty array-like: - x = [] - assert_isin_equal(x, b) - assert_isin_equal(a, x) - assert_isin_equal(x, x) + if kind in {None, "sort"}: + x = [] + assert_isin_equal(x, b) + assert_isin_equal(a, x) + assert_isin_equal(x, x) @pytest.mark.parametrize("kind", [None, "sort", "table"]) def test_in1d(self, kind): @@ -296,7 +297,8 @@ class TestSetOps: c = in1d(a, b, kind=kind) assert_array_equal(c, ec) - assert_array_equal(in1d([], [], kind=kind), []) + if kind in {None, "sort"}: + assert_array_equal(in1d([], [], kind=kind), []) def test_in1d_char_array(self): a = np.array(['a', 'b', 'c', 'd', 'e', 'c', 'e', 'b']) |