Skip to content

Commit 54557ae

Browse files
committed
data.draw() approach for test_symmetric_matrices
1 parent 593e3f6 commit 54557ae

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

array_api_tests/meta/test_hypothesis_helpers.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,9 @@ def run(n, d, data):
129129

130130

131131

132-
@given(m=hh.symmetric_matrices(hh.shared_floating_dtypes,
133-
finite=st.shared(st.booleans(), key='finite')),
134-
dtype=hh.shared_floating_dtypes,
135-
finite=st.shared(st.booleans(), key='finite'))
136-
def test_symmetric_matrices(m, dtype, finite):
132+
@given(finite=st.booleans(), dtype=xps.floating_dtypes(), data=st.data())
133+
def test_symmetric_matrices(finite, dtype, data):
134+
m = data.draw(hh.symmetric_matrices(st.just(dtype), finite=finite))
137135
assert m.dtype == dtype
138136
# TODO: This part of this test should be part of the .mT test
139137
ah.assert_exactly_equal(m, m.mT)

0 commit comments

Comments
 (0)