From c9628e59e50a72b109bd39ab268a0460301084c5 Mon Sep 17 00:00:00 2001 From: Leland McInnes Date: Tue, 8 Feb 2022 20:41:44 -0500 Subject: [PATCH] Fix the grad weighted minkowski as well... --- umap/distances.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/distances.py b/umap/distances.py index 5277973e..721ff3b4 100644 --- a/umap/distances.py +++ b/umap/distances.py @@ -256,7 +256,7 @@ def weighted_minkowski_grad(x, y, w=_mock_ones, p=2): """ result = 0.0 for i in range(x.shape[0]): - result += (w[i] * np.abs(x[i] - y[i])) ** p + result += w[i] * (np.abs(x[i] - y[i])) ** p grad = np.empty(x.shape[0], dtype=np.float32) for i in range(x.shape[0]):