Package: umap-learn / 0.5.3+dfsg-2

588e1f724c9f5de528eb1500b0c85a1a609fe947.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From 588e1f724c9f5de528eb1500b0c85a1a609fe947 Mon Sep 17 00:00:00 2001
From: Leland McInnes <leland.mcinnes@gmail.com>
Date: Wed, 18 Jan 2023 11:20:49 -0500
Subject: [PATCH] cast rows appropriately

---
 umap/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/umap/utils.py
+++ b/umap/utils.py
@@ -156,7 +156,7 @@
     unique_matrix[inverse]
     """
     lil_matrix = matrix.tolil()
-    rows = [x + y for x, y in zip(lil_matrix.rows, lil_matrix.data)]
+    rows = np.asarray([tuple(x + y) for x, y in zip(lil_matrix.rows, lil_matrix.data)], dtype=object)
     return_values = return_counts + return_inverse + return_index
     return np.unique(
         rows,