From 84c4676c09bb2ddb3506bcbebd7a6aaf1ddffccd Mon Sep 17 00:00:00 2001 From: Christian Ritter Date: Sat, 23 Oct 2021 13:53:43 -0400 Subject: [PATCH] DOC Ensures that linkage_tree passes numpydoc validation (#21424) * DOC numpydoc removed linkage_tree from FUNCTION_DOCSTRING_IGNORE_LIST * DOC numpydoc fixed linkage_tree func docstring --- maint_tools/test_docstrings.py | 1 - sklearn/cluster/_agglomerative.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/maint_tools/test_docstrings.py b/maint_tools/test_docstrings.py index 596ccd56a5293..37dbd5d68a440 100644 --- a/maint_tools/test_docstrings.py +++ b/maint_tools/test_docstrings.py @@ -22,7 +22,6 @@ "sklearn._config.get_config", "sklearn.base.clone", "sklearn.cluster._affinity_propagation.affinity_propagation", - "sklearn.cluster._agglomerative.linkage_tree", "sklearn.cluster._kmeans.k_means", "sklearn.cluster._kmeans.kmeans_plusplus", "sklearn.cluster._mean_shift.estimate_bandwidth", diff --git a/sklearn/cluster/_agglomerative.py b/sklearn/cluster/_agglomerative.py index 01799048a7f6b..a4a22c73e182f 100644 --- a/sklearn/cluster/_agglomerative.py +++ b/sklearn/cluster/_agglomerative.py @@ -429,11 +429,11 @@ def linkage_tree( observations of the two sets. affinity : str or callable, default='euclidean' - which metric to use. Can be 'euclidean', 'manhattan', or any + Which metric to use. Can be 'euclidean', 'manhattan', or any distance known to paired distance (see metric.pairwise). return_distance : bool, default=False - whether or not to return the distances between the clusters. + Whether or not to return the distances between the clusters. Returns -------