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

Function test_get_multi_QT

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

Source from the content-addressed store, hash-verified

139
140@pytest.mark.parametrize("T, m", test_data)
141def test_get_multi_QT(T, m):
142 start = 0
143 Q = core.rolling_window(T, m)
144 ref_QT = np.empty((Q.shape[0], Q.shape[1]), dtype="float64")
145 ref_QT_first = np.empty((Q.shape[0], Q.shape[1]), dtype="float64")
146
147 for dim in range(T.shape[0]):
148 ref_QT[dim] = naive_rolling_window_dot_product(
149 T[dim, start : start + m], T[dim]
150 )
151 ref_QT_first[dim] = naive_rolling_window_dot_product(T[dim, :m], T[dim])
152
153 comp_QT, comp_QT_first = _get_multi_QT(start, T, m)
154
155 npt.assert_almost_equal(ref_QT, comp_QT)
156 npt.assert_almost_equal(ref_QT_first, comp_QT_first)
157
158
159@pytest.mark.parametrize("T, m", test_data)

Callers

nothing calls this directly

Calls 2

_get_multi_QTFunction · 0.90

Tested by

no test coverage detected