guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: python-umap-learn: Patch for sklearn/numpy c


From: guix-commits
Subject: branch master updated: gnu: python-umap-learn: Patch for sklearn/numpy compatibility.
Date: Wed, 26 Apr 2023 12:57:29 -0400

This is an automated email from the git hooks/post-receive script.

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new e86851ccb3 gnu: python-umap-learn: Patch for sklearn/numpy 
compatibility.
e86851ccb3 is described below

commit e86851ccb3df1e87efca7138ee8d055a30832a4e
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Apr 26 18:34:46 2023 +0200

    gnu: python-umap-learn: Patch for sklearn/numpy compatibility.
    
    * gnu/packages/machine-learning.scm (python-umap-learn)[arguments]: Add 
phase
    'numpy-compatibility.
---
 gnu/packages/machine-learning.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index b4751507b7..e7415bbc93 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -3131,6 +3131,18 @@ These include a barrier, broadcast, and allreduce.")
      (list
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'numpy-compatibility
+            (lambda _
+              (substitute* "umap/tests/test_umap_metrics.py"
+                ;; See commit a714b59bd9e2ca2e63312bc3491b2b037a42f2f2
+                (("sparse_binary_data.todense\\(\\),")
+                 "np.asarray(sparse_binary_data.todense()),")
+                ;; See commit c7d05683325589ad432a55e109cacb9d631cfaa9
+                (("sparse_spatial_data.todense\\(\\),")
+                 "np.asarray(sparse_spatial_data.todense()),"))
+              ;; See commit 949abd082524fce8c45dfb147bcd8e8ef49eade3
+              (substitute* "umap/tests/test_umap_ops.py"
+                (("np.random,") "None,"))))
           ;; Numba needs a writable dir to cache functions.
           (add-before 'check 'set-numba-cache-dir
             (lambda _



reply via email to

[Prev in Thread] Current Thread [Next in Thread]