diff --git a/array_api_tests/test_indexing_functions.py b/array_api_tests/test_indexing_functions.py index a599d218..a5c3802c 100644 --- a/array_api_tests/test_indexing_functions.py +++ b/array_api_tests/test_indexing_functions.py @@ -20,7 +20,14 @@ def test_take(x, data): # * negative axis # * negative indices # * different dtypes for indices - axis = data.draw(st.integers(0, max(x.ndim - 1, 0)), label="axis") + + # axis is optional but only if x.ndim == 1 + _axis_st = st.integers(0, max(x.ndim - 1, 0)) + if x.ndim == 1: + kw = data.draw(hh.kwargs(axis=_axis_st)) + else: + kw = {"axis": data.draw(_axis_st)} + axis = kw.get("axis", 0) _indices = data.draw( st.lists(st.integers(0, x.shape[axis] - 1), min_size=1, unique=True), label="_indices", @@ -28,7 +35,7 @@ def test_take(x, data): indices = xp.asarray(_indices, dtype=dh.default_int) note(f"{indices=}") - out = xp.take(x, indices, axis=axis) + out = xp.take(x, indices, **kw) ph.assert_dtype("take", in_dtype=x.dtype, out_dtype=out.dtype) ph.assert_shape( diff --git a/array_api_tests/test_operators_and_elementwise_functions.py b/array_api_tests/test_operators_and_elementwise_functions.py index 84bcaa28..2ff6b907 100644 --- a/array_api_tests/test_operators_and_elementwise_functions.py +++ b/array_api_tests/test_operators_and_elementwise_functions.py @@ -953,6 +953,7 @@ def test_bitwise_right_shift(ctx, data): ) +@pytest.mark.skip("sometimes triggers hypothesis.errors.DeadlineExceeded") # TODO: fix! @pytest.mark.parametrize( "ctx", make_binary_params("bitwise_xor", dh.bool_and_all_int_dtypes) )