(op, ufunc, sym, dtypes)
| 76 | @pytest.mark.parametrize("dtypes", [ |
| 77 | ("S2", "S2"), ("S2", "S10"), ("<U1", "<U1"), ("<U1", ">U10")]) |
| 78 | def test_string_comparisons_empty(op, ufunc, sym, dtypes): |
| 79 | arr = np.empty((1, 0, 1, 5), dtype=dtypes[0]) |
| 80 | arr2 = np.empty((100, 1, 0, 1), dtype=dtypes[1]) |
| 81 | |
| 82 | expected = np.empty(np.broadcast_shapes(arr.shape, arr2.shape), dtype=bool) |
| 83 | assert_array_equal(op(arr, arr2), expected) |
| 84 | assert_array_equal(ufunc(arr, arr2), expected) |
| 85 | assert_array_equal(np.compare_chararrays(arr, arr2, sym, False), expected) |
| 86 | |
| 87 | |
| 88 | @pytest.mark.parametrize("str_dt", ["S", "U"]) |
nothing calls this directly
no test coverage detected