Skip to content

Commit c6e515a

Browse files
committed
Improved docstrings
1 parent fe158bc commit c6e515a

3 files changed

Lines changed: 8 additions & 14 deletions

File tree

src/tdamapper/core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
)
5656

5757
S = TypeVar("S")
58-
5958
T = TypeVar("T")
6059

6160

src/tdamapper/cover.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@
2121
from tdamapper.utils.vptree import PivotingStrategy, VPTree, VPTreeKind
2222

2323
T = TypeVar("T")
24-
T_contra = TypeVar("T_contra", contravariant=True)
2524
S = TypeVar("S")
25+
26+
T_contra = TypeVar("T_contra", contravariant=True)
2627
S_contra = TypeVar("S_contra", contravariant=True)
2728

29+
CubicalAlgorithm = Literal["standard", "proximity"]
30+
2831

2932
class _Pullback(Generic[S_contra, T_contra]):
3033
"""
@@ -291,21 +294,17 @@ class BaseCubicalCover:
291294
292295
:param n_intervals: The number of intervals to use for each dimension.
293296
Must be positive and less than or equal to the length of the dataset.
294-
Defaults to 1.
295297
:param overlap_frac: The fraction of overlap between adjacent intervals on
296298
each dimension, must be in the range (0.0, 0.5]. If not specified, the
297299
overlap_frac is computed such that the volume of the overlap within
298-
each hypercube is half the total volume. Defaults to None.
300+
each hypercube is half the total volume.
299301
:param kind: Specifies whether to use a flat or a hierarchical vantage
300-
point tree. Acceptable values are 'flat' or 'hierarchical'. Defaults to
301-
'flat'.
302+
point tree.
302303
:param leaf_capacity: The maximum number of points in a leaf node of the
303-
vantage point tree. Must be a positive value. Defaults to 1.
304+
vantage point tree. Must be a positive value.
304305
:param leaf_radius: The radius of the leaf nodes. If not specified, it
305-
defaults to the value of `radius`. Must be a positive value. Defaults
306-
to None.
306+
defaults to the value of `radius`. Must be a positive value.
307307
:param pivoting: The method used for pivoting in the vantage point tree.
308-
Acceptable values are None, 'random', or 'furthest'. Defaults to None.
309308
"""
310309

311310
_overlap_frac: float
@@ -553,9 +552,6 @@ def apply(self, X: ArrayRead[NDArray[np.float_]]) -> Iterator[list[int]]:
553552
yield neigh_ids
554553

555554

556-
CubicalAlgorithm = Literal["standard", "proximity"]
557-
558-
559555
class CubicalCover(ParamsMixin):
560556
"""
561557
Wrapper class for cubical cover algorithms, which cover data with open

src/tdamapper/learn.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from tdamapper.protocols import ArrayRead, Clustering, Cover
2727

2828
S_contra = TypeVar("S_contra", contravariant=True)
29-
3029
T_contra = TypeVar("T_contra", contravariant=True)
3130

3231

0 commit comments

Comments
 (0)