Skip to content

Commit

Permalink
remove binarization
Browse files Browse the repository at this point in the history
  • Loading branch information
aamijar committed Jun 28, 2024
1 parent 354e2eb commit 76b987f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cuml/metrics/pairwise_distances.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def pairwise_distances(X, Y=None, metric="euclidean", handle=None,
if metric in ['nan_euclidean']:
return nan_euclidean_distances(X, Y, **kwds)

if metric in {'russellrao', 'dice'} and not np.all(X.data == 1.):
if metric in {'russellrao'} and not np.all(X.data == 1.):
warnings.warn("X was converted to boolean for metric {}"
.format(metric))
X = np.where(X != 0., 1.0, 0.0)
Expand All @@ -368,7 +368,7 @@ def pairwise_distances(X, Y=None, metric="euclidean", handle=None,
if (n_samples_x == 1 or n_features_x == 1):
input_order = "K"

if metric in {'russellrao', 'dice'} and not np.all(Y.data == 1.):
if metric in {'russellrao'} and not np.all(Y.data == 1.):
warnings.warn("Y was converted to boolean for metric {}"
.format(metric))
Y = np.where(Y != 0., 1.0, 0.0)
Expand Down

0 comments on commit 76b987f

Please sign in to comment.