Skip to content

Commit aafb6a1

Browse files
committed
Fix scalars() to not generate integers for floating-point dtypes
1 parent 279677d commit aafb6a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_tests/hypothesis_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def scalars(draw, dtypes, finite=False):
370370
dtypes should be one of the shared_* dtypes strategies.
371371
"""
372372
dtype = draw(dtypes)
373-
if dtype in dh.dtype_ranges:
373+
if dh.is_int_dtype(dtype):
374374
m, M = dh.dtype_ranges[dtype]
375375
return draw(integers(m, M))
376376
elif dtype == bool_dtype:

0 commit comments

Comments
 (0)