Skip to content

Commit 593e3f6

Browse files
committed
symmetric_matrices: draw from finite if necessary
1 parent d58fb6b commit 593e3f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

array_api_tests/hypothesis_helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ def mutually_broadcastable_shapes(
251251
def symmetric_matrices(draw, dtypes=xps.floating_dtypes(), finite=True):
252252
shape = draw(square_matrix_shapes)
253253
dtype = draw(dtypes)
254+
if not isinstance(finite, bool):
255+
finite = draw(finite)
254256
elements = {'allow_nan': False, 'allow_infinity': False} if finite else None
255257
a = draw(xps.arrays(dtype=dtype, shape=shape, elements=elements))
256258
upper = xp.triu(a)

0 commit comments

Comments
 (0)