MCPcopy Index your code
hub / github.com/stumpy-dev/stumpy / test_multi_mass

Function test_multi_mass

tests/test_mstump.py:72–97  ·  view source on GitHub ↗
(T, m)

Source from the content-addressed store, hash-verified

70
71@pytest.mark.parametrize("T, m", test_data)
72def test_multi_mass(T, m):
73 trivial_idx = 2
74
75 Q = T[:, trivial_idx : trivial_idx + m]
76
77 ref = naive.multi_mass(Q, T, m)
78
79 T_subseq_isconstant = core.rolling_isconstant(T, m)
80 M_T, Σ_T = core.compute_mean_std(T, m)
81
82 Q_subseq_isconstant = np.expand_dims(T_subseq_isconstant[:, trivial_idx], 1)
83
84 comp = _multi_mass(
85 Q,
86 T,
87 m,
88 M_T,
89 Σ_T,
90 M_T[:, trivial_idx],
91 Σ_T[:, trivial_idx],
92 T_subseq_isconstant=T_subseq_isconstant,
93 Q_subseq_isconstant=Q_subseq_isconstant,
94 query_idx=trivial_idx,
95 )
96
97 npt.assert_almost_equal(ref, comp, decimal=config.STUMPY_TEST_PRECISION)
98
99
100@pytest.mark.parametrize("T, m", test_data)

Callers

nothing calls this directly

Calls 1

_multi_massFunction · 0.90

Tested by

no test coverage detected