Skip to content

Commit 7fbcf4d

Browse files
committed
Revert "restore hh.scalars strategy"
This reverts commit 4890591.
1 parent 4890591 commit 7fbcf4d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

array_api_tests/hypothesis_helpers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,12 @@ def scalars(draw, dtypes, finite=False, **kwds):
454454
"""
455455
Strategy to generate a scalar that matches a dtype strategy
456456
457-
dtypes should be one of the shared_* dtypes strategies.
457+
dtypes should be one of the shared_* dtypes strategies or a sequence of dtypes.
458458
"""
459-
dtype = draw(dtypes)
459+
if isinstance(dtypes, Sequence):
460+
dtype = draw(sampled_from(dtypes))
461+
else:
462+
dtype = draw(dtypes)
460463
mM = kwds.pop('mM', None)
461464
if dh.is_int_dtype(dtype):
462465
if mM is None:

0 commit comments

Comments
 (0)