Skip to content

Commit c083fa1

Browse files
committed
Add numeric arrays strategy that just generates scalars for now
1 parent 7de4852 commit c083fa1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

array_api_tests/hypothesis_helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
from operator import mul
33

44
from hypothesis.strategies import (lists, integers, builds, sampled_from,
5-
shared, tuples as hypotheses_tuples)
5+
shared, tuples as hypotheses_tuples,
6+
floats, just)
67

78
from .pytest_helpers import nargs
8-
from ._array_module import _dtypes, ones
9+
from ._array_module import _dtypes, ones, full
910
from . import _array_module
1011

1112
from .function_stubs import elementwise_functions
@@ -53,3 +54,6 @@ def tuples(elements, *, min_size=0, max_size=None, unique_by=None, unique=False)
5354
ones_arrays = builds(ones, shapes, dtype=shared_dtypes)
5455

5556
nonbroadcastable_ones_array_two_args = hypotheses_tuples(ones_arrays, ones_arrays)
57+
58+
# TODO: Generate general arrays here, rather than just scalars.
59+
numeric_arrays = builds(full, just((1,)), floats())

0 commit comments

Comments
 (0)