Skip to content

Commit 6998deb

Browse files
authored
TST: flaky test_single_axis (#272)
1 parent 9c9326a commit 6998deb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def test_xp(self, xp: ModuleType):
521521
class TestExpandDims:
522522
def test_single_axis(self, xp: ModuleType):
523523
"""Trivial case where xpx.expand_dims doesn't add anything to xp.expand_dims"""
524-
a = xp.empty((2, 3, 4, 5))
524+
a = xp.asarray(np.reshape(np.arange(2 * 3 * 4 * 5), (2, 3, 4, 5)))
525525
for axis in range(-5, 4):
526526
b = expand_dims(a, axis=axis)
527527
xp_assert_equal(b, xp.expand_dims(a, axis=axis))

0 commit comments

Comments
 (0)