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

Function test_multi_match

tests/test_motifs.py:532–554  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

530
531
532def test_multi_match():
533 T = np.random.uniform(-1000, 1000, size=(2, 64))
534 Q = np.random.uniform(-1000, 1000, size=(2, 64))
535
536 m = Q.shape[-1]
537 excl_zone = int(np.ceil(m / 4))
538 max_distance = 0.3
539
540 left = naive_multi_match(
541 Q,
542 T,
543 excl_zone,
544 max_distance=max_distance,
545 )
546
547 right = match(
548 Q,
549 T,
550 max_matches=None,
551 max_distance=lambda D: max_distance, # also test lambda functionality
552 )
553
554 npt.assert_almost_equal(left, right)
555
556
557def test_multi_match_isconstant():

Callers

nothing calls this directly

Calls 2

matchFunction · 0.90
naive_multi_matchFunction · 0.85

Tested by

no test coverage detected