From 43464d1c6ef9d1263775f98ec58a3b9d4d7f87b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de> Date: Wed, 15 Feb 2023 10:54:31 +0100 Subject: [PATCH] Add py-tree-math --- packages/py-tree-math/package.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/py-tree-math/package.py diff --git a/packages/py-tree-math/package.py b/packages/py-tree-math/package.py new file mode 100644 index 00000000..59f93429 --- /dev/null +++ b/packages/py-tree-math/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyTreeMath(PythonPackage): + """ + tree-math makes it easy to implement numerical algorithms that work on + JAX pytrees, such as iterative methods for optimization and equation + solving. It does so by providing a wrapper class tree_math.Vector that + defines array operations such as infix arithmetic and dot-products on + pytrees as if they were vectors. + """ + + homepage = "https://github.com/google/tree-math" + pypi = "tree-math/tree-math-0.1.0.tar.gz" + git = "https://github.com/google/tree-math.git" + + version('0.1.0.post', commit='0af9679125c13cc38dab5159bc8413ed79465344') + version('0.1.0', sha256='77eb8d6ba4d6cfdd2d986a6bc3fc2d1b16212f0172863a3ca509720babf75929') + + depends_on('py-setuptools', type='build') + depends_on('py-jax', type=('build', 'run')) -- GitLab