summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorFelix Gruber <felgru@posteo.net>2023-11-04 15:02:36 +0000
committerLudovic Courtès <ludo@gnu.org>2023-12-04 22:26:37 +0100
commitbe73e08ba2fd8e9280840f8fa962e9821ba5b71e (patch)
treee48b05704b7eef9e31a9055b199a7d923a1007e6 /gnu/packages/maths.scm
parent880310007288f9901514ae779809c7b4915dfcc9 (diff)
gnu: Add python-accupy.
* gnu/packages/maths.scm (python-accupy): New variable. * gnu/packages/patches/python-accupy-fix-use-of-perfplot.patch: New file. * gnu/packages/patches/python-accupy-use-matplotx.patch: New file. * gnu/local.mk (dist_patch_DATA): Add new patch files. Change-Id: I0222665d54a36830844b3b33e3dcb546741cfaa1 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 386fb30cd9..2769c4f6ec 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3650,6 +3650,47 @@ Cassowary solver with typical use cases gaining a 40x improvement. Memory
savings are consistently > 5x.")
(license license:bsd-3)))
+(define-public python-accupy
+ (package
+ (name "python-accupy")
+ (version "0.3.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/diego-hayashi/accupy")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0sxkwpp2xy2jgakhdxr4nh1cspqv8l89kz6s832h05pbpyc0n767"))
+ (patches (search-patches "python-accupy-use-matplotx.patch"
+ "python-accupy-fix-use-of-perfplot.patch"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-eigen-include-dir
+ (lambda _
+ (substitute* "setup.py"
+ (("include_dirs=\\[\"\\/usr\\/include\\/eigen3\\/\"\\]," _)
+ (string-append "include_dirs=[\""
+ #$(file-append (this-package-input "eigen")
+ "/include/eigen3/")
+ "\"],"))))))))
+ (propagated-inputs (list eigen python-mpmath python-pyfma))
+ (native-inputs (list pybind11
+ python-matplotx
+ python-perfplot
+ python-pytest))
+ (home-page "https://github.com/diego-hayashi/accupy")
+ (synopsis "Accurate calculation of sums and dot products")
+ (description
+ "@code{accupy} is a Python library for accurately computing sums
+and (dot) products. It implements Kahan summation, Shewchuck's
+algorithm and summation in K-fold precision.")
+ (license license:gpl3+)))
+
(define-public slepc
(package
(name "slepc")