Skip to content

Commit 3a90690

Browse files
committed
More forgiving size assertion in test_arange
1 parent f9b679f commit 3a90690

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_tests/test_creation_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def test_arange(dtype, data):
228228
# [0.0, 0.33, 0.66, 1.0, 1.33, 1.66]
229229
#
230230
min_size = math.floor(size * 0.9)
231-
max_size = math.ceil(size * 1.1)
231+
max_size = max(math.ceil(size * 1.1), 1)
232232
assert (
233233
min_size <= out.size <= max_size
234234
), f"{out.size=}, but should be roughly {size} {f_func}"

0 commit comments

Comments
 (0)