MCPcopy Create free account
hub / github.com/PythonOT/POT / test_dist_bures_squared

Function test_dist_bures_squared

test/test_gmm.py:94–108  ·  view source on GitHub ↗
(nx)

Source from the content-addressed store, hash-verified

92@pytest.skip_backend("tf") # skips because of array assignment
93@pytest.skip_backend("jax")
94def test_dist_bures_squared(nx):
95 m_s, m_t, C_s, C_t, _, _ = get_gmms(nx)
96 dist_bures_squared(m_s, m_t, C_s, C_t)
97 D0 = dist_bures_squared(m_s, m_s, C_s, C_s)
98
99 assert np.allclose(np.diag(D0), 0, atol=1e-6)
100
101 with pytest.raises(AssertionError):
102 dist_bures_squared(m_s[:, 1:], m_t, C_s, C_t)
103
104 with pytest.raises(AssertionError):
105 dist_bures_squared(m_s[1:], m_t, C_s, C_t)
106
107 with pytest.raises(AssertionError):
108 dist_bures_squared(m_s, m_t[1:], C_s, C_t)
109
110
111@pytest.skip_backend("tf") # skips because of array assignment

Callers

nothing calls this directly

Calls 4

dist_bures_squaredFunction · 0.90
get_gmmsFunction · 0.85
allcloseMethod · 0.45
diagMethod · 0.45

Tested by

no test coverage detected