Skip to content

Commit 4b42caf

Browse files
authored
Merge pull request #432 from ev-br/reshape_copy_arg
ENH: reshape: test copy= kwarg
2 parents af600b7 + ac0173e commit 4b42caf

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

array_api_tests/test_manipulation_functions.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,12 @@ def test_repeat(x, kw, data):
428428
@given(
429429
x=hh.arrays(dtype=hh.all_dtypes, shape=reshape_shape),
430430
shape=hh.reshape_shapes(reshape_shape),
431+
kw=hh.kwargs(copy=st.booleans() | st.none())
431432
)
432-
def test_reshape(x, shape):
433-
repro_snippet = ph.format_snippet(f"xp.reshape({x!r},{shape!r})")
434-
try:
435-
out = xp.reshape(x, shape)
433+
def test_reshape(x, shape, kw):
434+
repro_snippet = ph.format_snippet(f"xp.reshape({x!r},{shape!r}, **kw) with {kw =}")
435+
try:
436+
out = xp.reshape(x, shape, **kw)
436437

437438
ph.assert_dtype("reshape", in_dtype=x.dtype, out_dtype=out.dtype)
438439

0 commit comments

Comments
 (0)