MCPcopy
hub / github.com/stumpy-dev/stumpy / test_mstump_wrapper_include

Function test_mstump_wrapper_include

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

Source from the content-addressed store, hash-verified

318
319@pytest.mark.parametrize("T, m", test_data)
320def test_mstump_wrapper_include(T, m):
321 for width in range(T.shape[0]):
322 for i in range(T.shape[0] - width):
323 include = np.asarray(range(i, i + width + 1))
324
325 excl_zone = int(np.ceil(m / 4))
326
327 ref_P, ref_I = naive.mstump(T, m, excl_zone, include)
328 comp_P, comp_I = mstump(T, m, include)
329
330 npt.assert_almost_equal(ref_P, comp_P)
331 npt.assert_almost_equal(ref_I, comp_I)
332
333 df = pd.DataFrame(T.T)
334 comp_P, comp_I = mstump(df, m, include)
335
336 npt.assert_almost_equal(ref_P, comp_P)
337 npt.assert_almost_equal(ref_I, comp_I)
338
339
340def test_constant_subsequence_self_join():

Callers

nothing calls this directly

Calls 1

mstumpFunction · 0.90

Tested by

no test coverage detected