Skip to content

Commit

Permalink
Add check_collection to gtda/utils/__init__.py (#491)
Browse files Browse the repository at this point in the history
* Add check_collection to gtda/utils/__init__.py

* Improve paths in some tests
  • Loading branch information
ulupo authored Sep 14, 2020
1 parent 0304093 commit c11412e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions doc/modules/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:toctree: generated/utils
:template: function.rst

utils.check_diagrams
utils.check_point_clouds
utils.check_collection
utils.check_point_clouds
utils.check_diagrams
utils.validate_params
2 changes: 1 addition & 1 deletion gtda/time_series/tests/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import numpy as np
from numpy.testing import assert_almost_equal
from gtda.time_series.features import PermutationEntropy
from gtda.time_series import PermutationEntropy
from itertools import product

X = np.ones((10, 200, 3)) # 10 samples, of 200 points embedded in a 3d space
Expand Down
2 changes: 1 addition & 1 deletion gtda/time_series/tests/test_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from numpy.testing import assert_almost_equal
import pytest

from gtda.time_series.target import Labeller
from gtda.time_series import Labeller

signal = np.asarray([np.sin(x / 2) + 2 for x in range(0, 20)])
X = np.tile(np.arange(10), reps=2)
Expand Down
16 changes: 9 additions & 7 deletions gtda/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"""The module :mod:`gtda.utils` implements hyperparameter and input
validation functions."""
"""The module :mod:`gtda.utils` implements hyperparameter and input validation
functions."""

from .validation import check_diagrams, check_point_clouds, validate_params
from .validation import check_collection, check_point_clouds, check_diagrams, \
validate_params


__all__ = [
'check_diagrams',
'check_point_clouds',
'validate_params'
]
"check_collection",
"check_point_clouds",
"check_diagrams",
"validate_params"
]
4 changes: 2 additions & 2 deletions gtda/utils/tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest
from sklearn.exceptions import DataDimensionalityWarning

from gtda.utils.validation import check_diagrams, validate_params, \
check_point_clouds, check_collection
from gtda.utils import check_collection, check_point_clouds, check_diagrams, \
validate_params


# Testing for validate_params
Expand Down

0 comments on commit c11412e

Please sign in to comment.