Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stumpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from .aampdist import aampdist, aampdisted # noqa: F401
from .motifs import motifs, match # noqa: F401
from .aamp_motifs import aamp_motifs, aamp_match # noqa: F401
from .mmotifs import mmotifs # noqa: F401
from .aamp_mmotifs import aamp_mmotifs # noqa: F401
from .snippets import snippets # noqa: F401
from .aampdist_snippets import aampdist_snippets # noqa: F401
from .stimp import stimp, stimped # noqa: F401
Expand Down
3 changes: 1 addition & 2 deletions tests/test_aamp_mmotifs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import naive
import pytest

from stumpy.aamp_mmotifs import aamp_mmotifs
from stumpy import config
from stumpy import config, aamp_mmotifs


test_data = [
Expand Down
3 changes: 1 addition & 2 deletions tests/test_mmotifs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import naive
import pytest

from stumpy.mmotifs import mmotifs
from stumpy import config
from stumpy import config, mmotifs


test_data = [
Expand Down
12 changes: 12 additions & 0 deletions tests/test_non_normalized_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,18 @@ def test_match(T, m):
npt.assert_almost_equal(ref, comp)


@pytest.mark.parametrize("T, m", test_data)
def test_mmotifs(T, m):
mps, indices = stumpy.maamp(T, m)
ref_distances, ref_indices, ref_subspaces, ref_mdls = stumpy.aamp_mmotifs(
T, mps, indices
)
cmp_distances, cmp_indices, cmp_subspaces, cmp_mdls = stumpy.mmotifs(
T, mps, indices, normalize=False
)
npt.assert_almost_equal(ref_distances, cmp_distances)


def test_snippets():
T = np.random.rand(64)
m = 10
Expand Down