Skip to content

Commit f11fb13

Browse files
committed
limit the range in symmetric_matrices
1 parent d649c0c commit f11fb13

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

array_api_tests/hypothesis_helpers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,11 @@ def symmetric_matrices(draw, dtypes=real_floating_dtypes, finite=True, bound=10.
374374
dtype = draw(dtypes)
375375
if not isinstance(finite, bool):
376376
finite = draw(finite)
377-
elements = {'allow_nan': False, 'allow_infinity': False} if finite else None
377+
if finite:
378+
elements = {'allow_nan': False, 'allow_infinity': False,
379+
'min_value': -bound, 'max_value': bound}
380+
else:
381+
elements = None
378382
a = draw(arrays(dtype=dtype, shape=shape, elements=elements))
379383
at = ah._matrix_transpose(a)
380384
H = (a + at)*0.5

0 commit comments

Comments
 (0)