Skip to content

Commit

Permalink
Add put and putmask to testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
manopapad committed Jan 8, 2024
1 parent 166d2ef commit f7eb6c1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/integration/test_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,18 @@ def binary_arith(lib, a, slice_lhs, slice_rhs):
a[slice_lhs] += a[slice_rhs]


def put(lib, a, slice_lhs, slice_rhs):
indices = lib.flip(lib.arange(a[slice_rhs].size))
a[slice_lhs].put(indices, a[slice_rhs])


def putmask(lib, a, slice_lhs, slice_rhs):
mask = (mk_seq_array(lib, a[slice_rhs].shape) % 2).astype(bool)
lib.putmask(a[slice_lhs], mask, a[slice_rhs])


SHAPES = ((4,), (4, 5), (4, 5, 6))
OPERATIONS = (setitem, dot, unary_arith, binary_arith)
OPERATIONS = (setitem, dot, unary_arith, binary_arith, put, putmask)


@pytest.mark.parametrize("partial", (True, False))
Expand Down

0 comments on commit f7eb6c1

Please sign in to comment.