[bug#77190,28/34] gnu: Add python-algopy.

Message ID 527a8e0d5de5cd7ca1eae4ab027482b456f63c20.1742668052.git.sharlatanus@gmail.com
State New
Headers
Series Astro update 2025/03. |

Commit Message

Sharlatan Hellseher March 22, 2025, 8:29 p.m. UTC
  * gnu/packages/python-science.scm (python-algopy): New variable.

Change-Id: I6630f4677e0bd33f321cce9e6d1f40a6bf36c625
---
 gnu/packages/python-science.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
  

Patch

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 58abc3acee..bc78afc256 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -174,6 +174,39 @@  (define-public pyre
 maintainability.")
     (license license:bsd-3)))
 
+(define-public python-algopy
+  (package
+    (name "python-algopy")
+    (version "0.6.0") ; the higher versions requir NumPy 2+ stack
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "algopy" version))
+       (sha256
+        (base32 "1vjrzzxa3gvyh2zvm1vwg0s6a7dv23rihgdvgyj1vqniyymp91nq"))))
+    (build-system pyproject-build-system)
+    (native-inputs
+     (list python-pytest
+           python-setuptools
+           python-wheel))
+    (propagated-inputs
+     (list python-numpy
+           python-scipy))
+    (home-page "https://pythonhosted.org/algopy")
+    (synopsis "Algorithmic Differentation in Python")
+    (description
+     "AlgoPy provides a functionality to differentiate functions implemented
+as computer programs by using Algorithmic Differentiation (AD) techniques in
+the forward and reverse mode.
+
+The forward mode propagates univariate Taylor polynomials of arbitrary order.
+Hence it is also possible to use AlgoPy to evaluate higher-order derivative
+tensors.  The reverse mode is also known as backpropagation and can be found
+in similar form in tools like PyTorch.  Speciality of AlgoPy is the
+possibility to differentiate functions that contain matrix functions as
++,-,*,/, dot, solve, qr, eigh, cholesky.")
+    (license license:bsd-3)))
+
 (define-public python-cmocean
   (package
     (name "python-cmocean")