From 36457ad5c33e253d4998666a70ce94c914e596a4 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Wed, 2 Feb 2022 09:16:52 +0100 Subject: Doc review: use [sphinx docstring](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html) for line not to be bold --- src/python/gudhi/sklearn/cubical_persistence.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/python/gudhi/sklearn') diff --git a/src/python/gudhi/sklearn/cubical_persistence.py b/src/python/gudhi/sklearn/cubical_persistence.py index 27aeedf7..3997bc8a 100644 --- a/src/python/gudhi/sklearn/cubical_persistence.py +++ b/src/python/gudhi/sklearn/cubical_persistence.py @@ -81,19 +81,17 @@ class CubicalPersistence(BaseEstimator, TransformerMixin): return cubical_complex.persistence_intervals_in_dimension(self.persistence_dimension) def transform(self, X, Y=None): - """ - Compute all the cubical complexes and their associated persistence diagrams. + """Compute all the cubical complexes and their associated persistence diagrams. - Parameters: - X (list of list of float OR list of numpy.ndarray): List of cells filtration values that should be flatten - if `dimensions` is set in the constructor, or already with the correct shape in a numpy.ndarray (and - `dimensions` must not be set). + :param X: List of cells filtration values that should be flatten if `dimensions` is set in the constructor, or + already with the correct shape in a numpy.ndarray (and `dimensions` must not be set). + :type X: list of list of float OR list of numpy.ndarray + + :return: Persistence diagrams in the format: - Returns: - list of pairs or list of list of pairs: - Persistence diagrams in the format: - If `persistence_dimension` was set to `n`: `[array( Hn(X[0]) ), array( Hn(X[1]) ), ...]` - If `persistence_dimension` was set to `[i, j]`: `[[array( Hi(X[0]) ), array( Hj(X[0]) )], [array( Hi(X[1]) ), array( Hj(X[1]) )], ...]` + :rtype: list of pairs or list of list of pairs """ # Depends on persistence_dimension is an integer or a list of integer (else case) -- cgit v1.2.3