diff --git a/sklearn/tests/test_docstrings.py b/sklearn/tests/test_docstrings.py index 00206cfb86c9b..7a470422ba961 100644 --- a/sklearn/tests/test_docstrings.py +++ b/sklearn/tests/test_docstrings.py @@ -14,7 +14,6 @@ FUNCTION_DOCSTRING_IGNORE_LIST = [ "sklearn.utils.extmath.fast_logdet", "sklearn.utils.extmath.randomized_svd", - "sklearn.utils.extmath.svd_flip", "sklearn.utils.gen_batches", "sklearn.utils.metaestimators.if_delegate_has_method", ] diff --git a/sklearn/utils/extmath.py b/sklearn/utils/extmath.py index 4afa3a5540f98..b89747260b5b4 100644 --- a/sklearn/utils/extmath.py +++ b/sklearn/utils/extmath.py @@ -740,12 +740,12 @@ def svd_flip(u, v, u_based_decision=True): Parameters ---------- u : ndarray - u and v are the output of `linalg.svd` or + Parameters u and v are the output of `linalg.svd` or :func:`~sklearn.utils.extmath.randomized_svd`, with matching inner dimensions so one can compute `np.dot(u * s, v)`. v : ndarray - u and v are the output of `linalg.svd` or + Parameters u and v are the output of `linalg.svd` or :func:`~sklearn.utils.extmath.randomized_svd`, with matching inner dimensions so one can compute `np.dot(u * s, v)`. The input v should really be called vt to be consistent with scipy's @@ -756,11 +756,13 @@ def svd_flip(u, v, u_based_decision=True): Otherwise, use the rows of v. The choice of which variable to base the decision on is generally algorithm dependent. - Returns ------- - u_adjusted, v_adjusted : arrays with the same dimensions as the input. + u_adjusted : ndarray + Array u with adjusted columns and the same dimensions as u. + v_adjusted : ndarray + Array v with adjusted rows and the same dimensions as v. """ if u_based_decision: # columns of u, rows of v