Skip to content

Commit 24f6f20

Browse files
committed
Fix a check in test_linspace
The dtype could be None, which is not in the dtype_ranges mapping.
1 parent 295ee69 commit 24f6f20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_tests/test_creation_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def test_linspace(num, dtype, endpoint, data):
447447
assume(not xp.isnan(xp.asarray(start - stop, dtype=_dtype)))
448448
# avoid generating very large distances
449449
# https://github.com/data-apis/array-api-tests/issues/125
450-
assume(abs(stop - start) < dh.dtype_ranges[dtype].max)
450+
assume(abs(stop - start) < dh.dtype_ranges[_dtype].max)
451451

452452
kw = data.draw(
453453
hh.specified_kwargs(

0 commit comments

Comments
 (0)