summaryrefslogtreecommitdiff
path: root/gnu/packages/python-science.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-03-08 08:33:01 +0000
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-03-31 21:04:11 +0100
commit5b4368e5ce036d4560773a526ba2c663808dafe9 (patch)
treed21fc7ea82a73796729f8b36fd2de27be25e3864 /gnu/packages/python-science.scm
parent34411663a93ca3d89788c5b5a5704dffd13bdd15 (diff)
gnu: Add python-numdifftools.
* gnu/packages/python-science.scm (python-numdifftools): New variable. Change-Id: I0b5899e0bff10b488df5377c274eca63b26f9751
Diffstat (limited to 'gnu/packages/python-science.scm')
-rw-r--r--gnu/packages/python-science.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index dda8e44954..e5fc58ef95 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -359,6 +359,50 @@ Features:
@end itemize")
(license license:bsd-2)))
+(define-public python-numdifftools
+ (package
+ (name "python-numdifftools")
+ (version "0.9.41")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "numdifftools" version))
+ (sha256
+ (base32 "1d49wd5jqnl0500jyws0vb7nv4dy4bb5ml4z9qx1n8867k6hbxsf"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags #~(list "--pyargs" "numdifftools")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "setup.py"
+ ;; We can run tests without deprecated pytest-runner.
+ (("setup_requires.*") "")))))))
+ (native-inputs
+ (list python-algopy
+ python-line-profiler
+ python-pytest
+ python-setuptools
+ python-setuptools-scm
+ python-statsmodels
+ python-wheel))
+ (propagated-inputs
+ (list python-numpy
+ python-scipy))
+ (home-page "https://github.com/pbrod/numdifftools")
+ (synopsis "Solves automatic numerical differentiation problems")
+ (description
+ "This package implements a functionality to solve automatic numerical
+differentiation problems in one or more variables. Finite differences are
+used in an adaptive manner, coupled with a Richardson extrapolation
+methodology to provide a maximally accurate result. The user can configure
+many options like; changing the order of the method or the extrapolation, even
+allowing the user to specify whether complex-step, central, forward or
+backward differences are used.")
+ (license license:bsd-3)))
+
(define-public python-osqp
(package
(name "python-osqp")