Skip to content

Add Unit Tests for mmotifs and aamp_mmotifs #552

@seanlaw

Description

@seanlaw

The mmotifs and aamp_mmotifs features were recently added but they need unit tests to accompany them:

  • Add naive implementation for mmotifs and aamp_motifs in tests/naive.py
  • Add pytest -x -W ignore::RuntimeWarning -W ignore::DeprecationWarning tests/test_motifs.py to the test_unit function in test.sh
  • Add pytest -x -W ignore::RuntimeWarning -W ignore::DeprecationWarning tests/test_aamp_motifs.py to the test_unit function in test.sh
  • Add unit tests for mmotifs in tests/test_mmotifs.py
  • Add unit tests for aamp_motifs in tests/test_aamp_mmotifs.py
  • Add mmotifs and aamp_motifs to stumpy/__init__.py
  • Add mmotifs to docs/api.rst
  • Add Example section to mmotifs() docstring:
    Examples
    --------
    >>> mp = stumpy.stump(np.array([584., -11., 23., 79., 1001., 0., -19.]), m=3)
    >>> stumpy.motifs(
    ...     np.array([584., -11., 23., 79., 1001., 0., -19.]),
    ...     mp[:, 0],
    ...     max_distance=2.0)
    (array([[0.        , 0.11633857]]), array([[0, 4]]))

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions