Skip to content

Commit 6119ab2

Browse files
committed
ENH: test permute_dims with axis < 0
1 parent 0c5d449 commit 6119ab2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_tests/test_manipulation_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ def test_flip(x, data):
284284
x=hh.arrays(dtype=hh.all_dtypes, shape=shared_shapes(min_dims=1)),
285285
axes=shared_shapes(min_dims=1).flatmap(
286286
lambda s: st.lists(
287-
st.integers(0, len(s) - 1),
287+
st.integers(-len(s), len(s) - 1),
288288
min_size=len(s),
289289
max_size=len(s),
290-
unique=True,
290+
unique_by=lambda ax: ax if ax >= 0 else ax + len(s),
291291
).map(tuple)
292292
),
293293
)

0 commit comments

Comments
 (0)