From ccb63b32bc65c0a6030dfab0b70ece62d9eff988 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Sun, 28 Feb 2021 16:14:54 +0100 Subject: Move documentation string to class --- src/python/gudhi/representations/vector_methods.py | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/python/gudhi/representations/vector_methods.py b/src/python/gudhi/representations/vector_methods.py index fda0a22d..13630360 100644 --- a/src/python/gudhi/representations/vector_methods.py +++ b/src/python/gudhi/representations/vector_methods.py @@ -357,6 +357,16 @@ class BettiCurve2(BaseEstimator, TransformerMixin): """ A more flexible replacement for the BettiCurve class. + Parameters + ---------- + grid: 1d array or None, default=None + Filtration grid points at which to compute the Betti curves. Must be strictly ordered. Infinites are OK. If None (default), a grid will be computed that captures all the filtration value changes. + + Attributes + ---------- + grid_: 1d array + Contains the compute grid after fit or fit_transform. + Examples -------- If pd is a persistence diagram and xs is a grid such that xs[0] >= pd.min(), then the result of @@ -372,20 +382,6 @@ class BettiCurve2(BaseEstimator, TransformerMixin): """ def __init__(self, grid = None): - """ - Constructor for the BettiCurve class. - - Parameters - ---------- - grid: 1d array or None, default=None - Filtration grid points at which to compute the Betti curves. Must be strictly ordered. Infinites are OK. If None (default), a grid will be computed that captures all the filtration value changes. - - Attributes - ---------- - grid_: 1d array - Contains the compute grid after fit or fit_transform. - """ - self.grid_ = np.array(grid) -- cgit v1.2.3