@@ -305,7 +305,7 @@ def euclidean_distances(
305
305
However, this is not the most precise way of doing this computation,
306
306
because this equation potentially suffers from "catastrophic cancellation".
307
307
Also, the distance matrix returned by this function may not be exactly
308
- symmetric as required by, e.g., `` scipy.spatial.distance` ` functions.
308
+ symmetric as required by, e.g., :mod:` scipy.spatial.distance` functions.
309
309
310
310
Read more in the :ref:`User Guide <metrics>`.
311
311
@@ -757,7 +757,7 @@ def pairwise_distances_argmin_min(
757
757
758
758
metric : str or callable, default='euclidean'
759
759
Metric to use for distance computation. Any metric from scikit-learn
760
- or scipy.spatial.distance can be used.
760
+ or :mod:` scipy.spatial.distance` can be used.
761
761
762
762
If metric is a callable function, it is called on each
763
763
pair of instances (rows) and the resulting value recorded. The callable
@@ -772,13 +772,13 @@ def pairwise_distances_argmin_min(
772
772
- from scikit-learn: ['cityblock', 'cosine', 'euclidean', 'l1', 'l2',
773
773
'manhattan', 'nan_euclidean']
774
774
775
- - from scipy.spatial.distance: ['braycurtis', 'canberra', 'chebyshev',
775
+ - from :mod:` scipy.spatial.distance` : ['braycurtis', 'canberra', 'chebyshev',
776
776
'correlation', 'dice', 'hamming', 'jaccard', 'kulsinski',
777
777
'mahalanobis', 'minkowski', 'rogerstanimoto', 'russellrao',
778
778
'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean',
779
779
'yule']
780
780
781
- See the documentation for scipy.spatial.distance for details on these
781
+ See the documentation for :mod:` scipy.spatial.distance` for details on these
782
782
metrics.
783
783
784
784
.. note::
@@ -905,7 +905,7 @@ def pairwise_distances_argmin(X, Y, *, axis=1, metric="euclidean", metric_kwargs
905
905
906
906
metric : str or callable, default="euclidean"
907
907
Metric to use for distance computation. Any metric from scikit-learn
908
- or scipy.spatial.distance can be used.
908
+ or :mod:` scipy.spatial.distance` can be used.
909
909
910
910
If metric is a callable function, it is called on each
911
911
pair of instances (rows) and the resulting value recorded. The callable
@@ -920,13 +920,13 @@ def pairwise_distances_argmin(X, Y, *, axis=1, metric="euclidean", metric_kwargs
920
920
- from scikit-learn: ['cityblock', 'cosine', 'euclidean', 'l1', 'l2',
921
921
'manhattan', 'nan_euclidean']
922
922
923
- - from scipy.spatial.distance: ['braycurtis', 'canberra', 'chebyshev',
923
+ - from :mod:` scipy.spatial.distance` : ['braycurtis', 'canberra', 'chebyshev',
924
924
'correlation', 'dice', 'hamming', 'jaccard', 'kulsinski',
925
925
'mahalanobis', 'minkowski', 'rogerstanimoto', 'russellrao',
926
926
'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean',
927
927
'yule']
928
928
929
- See the documentation for scipy.spatial.distance for details on these
929
+ See the documentation for :mod:` scipy.spatial.distance` for details on these
930
930
metrics.
931
931
932
932
.. note::
@@ -2146,7 +2146,7 @@ def pairwise_distances_chunked(
2146
2146
metric : str or callable, default='euclidean'
2147
2147
The metric to use when calculating distance between instances in a
2148
2148
feature array. If metric is a string, it must be one of the options
2149
- allowed by scipy.spatial.distance.pdist for its metric parameter,
2149
+ allowed by :func:` scipy.spatial.distance.pdist` for its metric parameter,
2150
2150
or a metric listed in pairwise.PAIRWISE_DISTANCE_FUNCTIONS.
2151
2151
If metric is "precomputed", X is assumed to be a distance matrix.
2152
2152
Alternatively, if metric is a callable function, it is called on
@@ -2170,7 +2170,7 @@ def pairwise_distances_chunked(
2170
2170
2171
2171
**kwds : optional keyword parameters
2172
2172
Any further parameters are passed directly to the distance function.
2173
- If using a scipy.spatial.distance metric, the parameters are still
2173
+ If using a :mod:` scipy.spatial.distance` metric, the parameters are still
2174
2174
metric dependent. See the scipy docs for usage examples.
2175
2175
2176
2176
Yields
@@ -2326,12 +2326,11 @@ def pairwise_distances(
2326
2326
'manhattan', 'nan_euclidean']. All metrics support sparse matrix
2327
2327
inputs except 'nan_euclidean'.
2328
2328
2329
- - From scipy.spatial.distance: ['braycurtis', 'canberra', 'chebyshev',
2329
+ - From :mod:` scipy.spatial.distance` : ['braycurtis', 'canberra', 'chebyshev',
2330
2330
'correlation', 'dice', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis',
2331
2331
'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean',
2332
- 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'yule']
2333
- See the documentation for scipy.spatial.distance for details on these
2334
- metrics. These metrics do not support sparse matrix inputs.
2332
+ 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'yule'].
2333
+ These metrics do not support sparse matrix inputs.
2335
2334
2336
2335
.. note::
2337
2336
`'kulsinski'` is deprecated from SciPy 1.9 and will be removed in SciPy 1.11.
@@ -2340,7 +2339,7 @@ def pairwise_distances(
2340
2339
`'matching'` has been removed in SciPy 1.9 (use `'hamming'` instead).
2341
2340
2342
2341
Note that in the case of 'cityblock', 'cosine' and 'euclidean' (which are
2343
- valid scipy.spatial.distance metrics), the scikit-learn implementation
2342
+ valid :mod:` scipy.spatial.distance` metrics), the scikit-learn implementation
2344
2343
will be used, which is faster and has support for sparse matrices (except
2345
2344
for 'cityblock'). For a verbose description of the metrics from
2346
2345
scikit-learn, see :func:`sklearn.metrics.pairwise.distance_metrics`
@@ -2363,7 +2362,7 @@ def pairwise_distances(
2363
2362
metric : str or callable, default='euclidean'
2364
2363
The metric to use when calculating distance between instances in a
2365
2364
feature array. If metric is a string, it must be one of the options
2366
- allowed by scipy.spatial.distance.pdist for its metric parameter, or
2365
+ allowed by :func:` scipy.spatial.distance.pdist` for its metric parameter, or
2367
2366
a metric listed in ``pairwise.PAIRWISE_DISTANCE_FUNCTIONS``.
2368
2367
If metric is "precomputed", X is assumed to be a distance matrix.
2369
2368
Alternatively, if metric is a callable function, it is called on each
0 commit comments