@@ -344,7 +344,8 @@ def pairwise_distances_argmin_min(X, Y, axis=1, metric="euclidean",
344
344
345
345
346
346
def pairwise_distances_argmin (X , Y , axis = 1 , metric = "euclidean" ,
347
- batch_size = 500 , metric_kwargs = {}):
347
+ batch_size = 500 , metric_kwargs = {},
348
+ check_X_y = True ):
348
349
"""Compute minimum distances between one point and a set of points.
349
350
350
351
This function computes for each row in X, the index of the row of Y which
@@ -399,6 +400,10 @@ def pairwise_distances_argmin(X, Y, axis=1, metric="euclidean",
399
400
metric_kwargs : dict
400
401
keyword arguments to pass to specified metric function.
401
402
403
+ check_X_y : bool, default True
404
+ Whether or not to check X and y for shape, validity and dtype. Speed
405
+ improvements possible if set to False when called repeatedly.
406
+
402
407
Returns
403
408
=======
404
409
argmin : numpy.ndarray
@@ -410,7 +415,7 @@ def pairwise_distances_argmin(X, Y, axis=1, metric="euclidean",
410
415
sklearn.metrics.pairwise_distances_argmin_min
411
416
"""
412
417
return pairwise_distances_argmin_min (X , Y , axis , metric , batch_size ,
413
- metric_kwargs )[0 ]
418
+ metric_kwargs , check_X_y )[0 ]
414
419
415
420
416
421
def manhattan_distances (X , Y = None , sum_over_features = True ,
0 commit comments