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

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new de2db0e83d gnu: Add python-numpysane.
de2db0e83d is described below

commit de2db0e83d30153c623b586cde03a45ca00223b9
Author: Danny Milosavljevic <[email protected]>
AuthorDate: Sun Jun 1 19:47:32 2025 +0200

    gnu: Add python-numpysane.
    
    * gnu/packages/python-xyz.scm (python-numpysane): New variable.
    
    Change-Id: Ie15b59d56e7ba403ed966ca8289eec81c32e1b95
---
 gnu/packages/python-xyz.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c1232ecc80..2aabb83d20 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10043,6 +10043,62 @@ include_dirs = ~:*~a/include~%" #$(this-package-input 
"openblas"))))))
            python-typing-extensions
            python-wheel))))
 
+(define-public python-numpysane
+  (package
+    (name "python-numpysane")
+    (version "0.42")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/dkogan/numpysane.git";)
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0s38fm88bmq08j5qxfka1wyjs2r9s9arzd1c3c4ixa8k3pisnihr"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "Makefile.common.header"
+                    ;; numpy 2.0 has this--but we don't use numpy 2.0.
+                    (("pkg-config --cflags-only-I numpy")
+                     (string-append "echo -I"
+                                    (assoc-ref inputs "python-numpy")
+                                    "/lib/python"
+                                    #$(version-major+minor
+                                       (package-version python))
+                                    "/site-packages/numpy/core/include")))))
+               (replace 'check
+                 (lambda _
+                   (setenv "CC" #$(cc-for-target))
+                   (invoke "make" "check"))))))
+    (propagated-inputs
+     (list python-numpy))
+    (native-inputs
+     (list perl pkg-config))
+    (synopsis "More-reasonable core functionality for numpy")
+    (description "This package provides more-reasonable core functionality for 
numpy.
+
+A lot of numpysane functionality is inspired by PDL (Perl Data Language).
+
+numpysane has:
+@itemize
+@item easier broadcasting
+@item nicer array manipulation
+@item array concatenation
+@item manipulation of dimensions
+@item broadcast-aware inner product
+@item broadcast-aware outer product
+@item broadcast-aware 2-norm
+@item broadcast-aware matrix multiplication
+@end itemize
+")
+    (home-page "https://github.com/dkogan/numpysane";)
+    (license license:lgpl2.0+)))
+
 (define-public python-numpy-documentation
   (package
     (inherit python-numpy)

Reply via email to