Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sklearn/tests/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"sklearn.utils.metaestimators.available_if",
"sklearn.utils.metaestimators.if_delegate_has_method",
"sklearn.utils.multiclass.unique_labels",
"sklearn.utils.sparsefuncs.incr_mean_variance_axis",
"sklearn.utils.sparsefuncs.inplace_swap_row_csc",
"sklearn.utils.sparsefuncs.inplace_swap_row_csr",
]
Expand Down
7 changes: 3 additions & 4 deletions sklearn/utils/sparsefuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ def mean_variance_axis(X, axis, weights=None, return_sum_weights=False):


def incr_mean_variance_axis(X, *, axis, last_mean, last_var, last_n, weights=None):
"""Compute incremental mean and variance along an axis on a CSR or
CSC matrix.
"""Compute incremental mean and variance along an axis on a CSR or CSC matrix.

last_mean, last_var are the statistics computed at the last step by this
function. Both must be initialized to 0-arrays of the proper size, i.e.
Expand All @@ -153,8 +152,8 @@ def incr_mean_variance_axis(X, *, axis, last_mean, last_var, last_n, weights=Non
last_n : float or ndarray of shape (n_features,) or (n_samples,), \
dtype=floating
Sum of the weights seen so far, excluding the current weights
If not float, it should be of shape (n_samples,) if
axis=0 or (n_features,) if axis=1. If float it corresponds to
If not float, it should be of shape (n_features,) if
axis=0 or (n_samples,) if axis=1. If float it corresponds to
having same weights for all samples (or features).

weights : ndarray of shape (n_samples,) or (n_features,), default=None
Expand Down