Skip to content

Commit 58e5a5f

Browse files
committed
Allow invertible matrices to accept a stack_shapes parameter
1 parent 9d1732d commit 58e5a5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_tests/hypothesis_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ def positive_definite_matrices(draw, dtypes=xps.floating_dtypes()):
147147
return broadcast_to(eye(n, dtype=dtype), shape)
148148

149149
@composite
150-
def invertible_matrices(draw, dtypes=xps.floating_dtypes()):
150+
def invertible_matrices(draw, dtypes=xps.floating_dtypes(), stack_shapes=shapes):
151151
# For now, just generate stacks of diagonal matrices.
152152
n = draw(integers(0, SQRT_MAX_ARRAY_SIZE),)
153-
stack_shape = draw(shapes)
153+
stack_shape = draw(stack_shapes)
154154
shape = stack_shape + (n, n)
155155
d = draw(xps.arrays(dtypes, shape=n*prod(stack_shape),
156156
elements=dict(allow_nan=False, allow_infinity=False)))

0 commit comments

Comments
 (0)