def test_prim_array_setitem(): L = np.array([1, 2, 3, 4]) L2 = np.array([1, 22, 3, 4]) assert np.all(array_setitem(L, (1, ), (2, ), (1, ), 22) == L2) assert not np.all(L == L2) # test that this is not inplace
def test_array_setitem(x, v): return array_setitem(x, (0, 1), (3, 5), (2, 3), v)