summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-autograd/package.py
blob: 51512168000fab8cd5f3e451ff057c49c517bab4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright 2013-2024 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.package import *


class PyAutograd(PythonPackage):
    """Autograd can automatically differentiate native Python and
    Numpy code. It can handle a large subset of Python's features,
    including loops, ifs, recursion and closures, and it can even take
    derivatives of derivatives of derivatives. It supports
    reverse-mode differentiation (a.k.a. backpropagation), which means
    it can efficiently take gradients of scalar-valued functions with
    respect to array-valued arguments, as well as forward-mode
    differentiation, and the two can be composed arbitrarily. The main
    intended application of Autograd is gradient-based
    optimization. For more information, check out the tutorial and the
    examples directory."""

    homepage = "https://github.com/HIPS/autograd"
    pypi = "autograd/autograd-1.3.tar.gz"

    license("MIT")

    version("1.3", sha256="a15d147577e10de037de3740ca93bfa3b5a7cdfbc34cfb9105429c3580a33ec4")

    depends_on("py-setuptools", type="build")
    depends_on("py-future@0.15.2:", type=("build", "run"))
    depends_on("py-numpy@1.12:", type=("build", "run"))