8000 DOC Ensures that incr_mean_variance_axis passes numpydoc validation (… · thomasjpfan/scikit-learn@02e36b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02e3 8000 6b4

Browse files
authored
DOC Ensures that incr_mean_variance_axis passes numpydoc validation (scikit-learn#24477)
1 parent 60cc5b5 commit 02e36b4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"sklearn.utils.metaestimators.available_if",
3636
"sklearn.utils.metaestimators.if_delegate_has_method",
3737
"sklearn.utils.multiclass.unique_labels",
38-
"sklearn.utils.sparsefuncs.incr_mean_variance_axis",
3938
"sklearn.utils.sparsefuncs.inplace_swap_row_csc",
4039
"sklearn.utils.sparsefuncs.inplace_swap_row_csr",
4140
]

sklearn/utils/sparsefuncs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ def mean_variance_axis(X, axis, weights=None, return_sum_weights=False):
126126

127127

128128
def incr_mean_variance_axis(X, *, axis, last_mean, last_var, last_n, weights=None):
129-
"""Compute incremental mean and variance along an axis on a CSR or
130-
CSC matrix.
129+
"""Compute incremental mean and variance along an axis on a CSR or CSC matrix.
131130
132131
last_mean, last_var are the statistics computed at the last step by this
133132
function. Both must be initialized to 0-arrays of the proper size, i.e.
@@ -153,8 +152,8 @@ def incr_mean_variance_axis(X, *, axis, last_mean, last_var, last_n, weights=Non
153152
last_n : float or ndarray of shape (n_features,) or (n_samples,), \
154153
dtype=floating
155154
Sum of the weights seen so far, excluding the current weights
156-
If not float, it should be of shape (n_samples,) if
157-
axis=0 or (n_features,) if axis=1. If float it corresponds to
155+
If not float, it should be of shape (n_features,) if
156+
axis=0 or (n_samples,) if axis=1. If float it corresponds to
158157
having same weights for all samples (or features).
159158
160159
weights : ndarray of shape (n_samples,) or (n_features,), default=None

0 commit comments

Comments
 (0)
0