diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2025-06-01 19:47:32 +0200 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2025-06-01 20:12:28 +0200 |
| commit | de2db0e83d30153c623b586cde03a45ca00223b9 (patch) | |
| tree | ea7c728dc2dc386f434ce695761775e8b0ba2314 | |
| parent | 50c18df92fdb2cb1b0cd1bfe115216a38e7dcf19 (diff) | |
gnu: Add python-numpysane.
* gnu/packages/python-xyz.scm (python-numpysane): New variable.
Change-Id: Ie15b59d56e7ba403ed966ca8289eec81c32e1b95
| -rw-r--r-- | gnu/packages/python-xyz.scm | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c1232ecc805..2aabb83d206 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")))))) | |||
| 10043 | python-typing-extensions | 10043 | python-typing-extensions |
| 10044 | python-wheel)))) | 10044 | python-wheel)))) |
| 10045 | 10045 | ||
| 10046 | (define-public python-numpysane | ||
| 10047 | (package | ||
| 10048 | (name "python-numpysane") | ||
| 10049 | (version "0.42") | ||
| 10050 | (source (origin | ||
| 10051 | (method git-fetch) | ||
| 10052 | (uri (git-reference | ||
| 10053 | (url "https://github.com/dkogan/numpysane.git") | ||
| 10054 | (commit (string-append "v" version)))) | ||
| 10055 | (file-name (git-file-name name version)) | ||
| 10056 | (sha256 | ||
| 10057 | (base32 | ||
| 10058 | "0s38fm88bmq08j5qxfka1wyjs2r9s9arzd1c3c4ixa8k3pisnihr")))) | ||
| 10059 | (build-system python-build-system) | ||
| 10060 | (arguments | ||
| 10061 | (list #:phases | ||
| 10062 | #~(modify-phases %standard-phases | ||
| 10063 | (add-after 'unpack 'patch | ||
| 10064 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 10065 | (substitute* "Makefile.common.header" | ||
| 10066 | ;; numpy 2.0 has this--but we don't use numpy 2.0. | ||
| 10067 | (("pkg-config --cflags-only-I numpy") | ||
| 10068 | (string-append "echo -I" | ||
| 10069 | (assoc-ref inputs "python-numpy") | ||
| 10070 | "/lib/python" | ||
| 10071 | #$(version-major+minor | ||
| 10072 | (package-version python)) | ||
| 10073 | "/site-packages/numpy/core/include"))))) | ||
| 10074 | (replace 'check | ||
| 10075 | (lambda _ | ||
| 10076 | (setenv "CC" #$(cc-for-target)) | ||
| 10077 | (invoke "make" "check")))))) | ||
| 10078 | (propagated-inputs | ||
| 10079 | (list python-numpy)) | ||
| 10080 | (native-inputs | ||
| 10081 | (list perl pkg-config)) | ||
| 10082 | (synopsis "More-reasonable core functionality for numpy") | ||
| 10083 | (description "This package provides more-reasonable core functionality for numpy. | ||
| 10084 | |||
| 10085 | A lot of numpysane functionality is inspired by PDL (Perl Data Language). | ||
| 10086 | |||
| 10087 | numpysane has: | ||
| 10088 | @itemize | ||
| 10089 | @item easier broadcasting | ||
| 10090 | @item nicer array manipulation | ||
| 10091 | @item array concatenation | ||
| 10092 | @item manipulation of dimensions | ||
| 10093 | @item broadcast-aware inner product | ||
| 10094 | @item broadcast-aware outer product | ||
| 10095 | @item broadcast-aware 2-norm | ||
| 10096 | @item broadcast-aware matrix multiplication | ||
| 10097 | @end itemize | ||
| 10098 | ") | ||
| 10099 | (home-page "https://github.com/dkogan/numpysane") | ||
| 10100 | (license license:lgpl2.0+))) | ||
| 10101 | |||
| 10046 | (define-public python-numpy-documentation | 10102 | (define-public python-numpy-documentation |
| 10047 | (package | 10103 | (package |
| 10048 | (inherit python-numpy) | 10104 | (inherit python-numpy) |
