def test_match(T, m):
    if T.ndim > 1:
        T = T.copy()
        T = T[0]

    Q = T[:m]
    ref = stumpy.aamp_match(Q, T)
    comp = stumpy.match(Q, T, normalize=False)
    npt.assert_almost_equal(ref, comp)
Beispiel #2
0
def test_match(Q, T):
    m = Q.shape[0]
    excl_zone = int(np.ceil(m / 4))
    max_distance = 0.3

    left = naive_match(
        Q,
        T,
        excl_zone,
        max_distance=max_distance,
    )

    right = match(
        Q,
        T,
        max_matches=None,
        max_distance=lambda D: max_distance,  # also test lambda functionality
    )

    npt.assert_almost_equal(left, right)