From 803befde95b6315199423b9aaca8054d5bf91d73 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 22 Jan 2025 15:44:02 +0100 Subject: [PATCH] gnu: Add python-pymanopt. * gnu/packages/machine-learning.scm (python-pymanopt): New variable. Change-Id: Id10413a0f2f76a8a3ac9e6fee22005a92625323c --- gnu/packages/machine-learning.scm | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index cc7b7469794bf810ace1fe5afcc528b1ca111f00..ecc9aa3a1977907b864fc2232794ea16570e1a08 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1092,6 +1092,46 @@ It currently houses implementations of ") (license license:expat))) ; MIT License +(define-public python-pymanopt + (package + (name "python-pymanopt") + (version "2.2.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pymanopt" version)) + (sha256 + (base32 "1nm1yz5hbj1valqq23r8c1g9rhfdndfswlqv6xrnvc3f8fd95167")))) + (build-system pyproject-build-system) + (arguments + (list + ;; Tests require jax and tensorflow, which are optional. + #:tests? #false + #:phases + '(modify-phases %standard-phases + ;; This is probably a bad idea. We don't have scipy 1.13 just yet. + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "pyproject.toml" + ((",!=1.12\\.\\*") ""))))))) + (propagated-inputs (list python-numpy python-scipy)) + (native-inputs (list python-autograd + python-flake8 + python-flake8-bugbear + python-isort + python-matplotlib + python-pytest + python-pytest-cov + python-setuptools + python-setuptools-scm + python-wheel)) + (home-page "https://pymanopt.org/") + (synopsis "Toolbox for optimization on Riemannian manifolds") + (description + "This package is a toolbox for optimization on Riemannian manifolds with +support for automatic differentiation.") + (license license:bsd-3))) + (define-public python-ripser (package (name "python-ripser")