File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 48
48
dtypes = dtypes .filter (lambda x : not isinstance (x , _UndefinedStub ))
49
49
50
50
shared_dtypes = shared (dtypes , key = "dtype" )
51
+ shared_floating_dtypes = shared (floating_dtypes , key = "dtype" )
51
52
52
53
# TODO: Importing things from test_type_promotion should be replaced by
53
54
# something that won't cause a circular import. Right now we use @st.composite
Original file line number Diff line number Diff line change 11
11
UNDEFINED_DTYPES = any (isinstance (d , _UndefinedStub ) for d in ah .dtype_objects )
12
12
pytestmark = [pytest .mark .skipif (UNDEFINED_DTYPES , reason = "undefined dtypes" )]
13
13
14
-
15
14
@given (hh .mutually_promotable_dtypes ([xp .float32 , xp .float64 ]))
16
15
def test_mutually_promotable_dtypes (pairs ):
17
16
assert pairs in (
@@ -70,3 +69,15 @@ def run(kw):
70
69
c_results = [kw for kw in results if "c" in kw ]
71
70
assert len (c_results ) > 0
72
71
assert all (isinstance (kw ["c" ], str ) for kw in c_results )
72
+
73
+ @given (hh .symmetric_matrices (hh .shared_floating_dtypes ), hh .shared_floating_dtypes )
74
+ def test_symmetric_matrices (m , dtype ):
75
+ assert m .dtype == dtype
76
+ # TODO: This part of this test should be part of the .mT test
77
+ ah .assert_exactly_equal (m , m .mT )
78
+
79
+
80
+ @given (hh .positive_definite_matrices (hh .shared_floating_dtypes ), hh .shared_floating_dtypes )
81
+ def test_positive_definite_matrices (m , dtype ):
82
+ assert m .dtype == dtype
83
+ # TODO: Test that it actually is positive definite
You can’t perform that action at this time.
0 commit comments