()
| 149 | |
| 150 | |
| 151 | def test_gmm_apply_map(): |
| 152 | m_s, m_t, C_s, C_t, w_s, w_t = get_gmms() |
| 153 | rng = np.random.RandomState(seed=42) |
| 154 | x = rng.randn(7, 3) |
| 155 | |
| 156 | for method in ["bary", "rand"]: |
| 157 | gmm_ot_apply_map(x, m_s, m_t, C_s, C_t, w_s, w_t, method=method) |
| 158 | |
| 159 | plan = gmm_ot_plan(m_s, m_t, C_s, C_t, w_s, w_t) |
| 160 | gmm_ot_apply_map(x, m_s, m_t, C_s, C_t, w_s, w_t, plan=plan) |
| 161 | |
| 162 | |
| 163 | @pytest.mark.skipif(not torch, reason="No torch available") |
nothing calls this directly
no test coverage detected