Skip to main content

Advect

CI Coverage PyPI Python versions

Advect is a focused automatic differentiation library for scientific Python, with broad NumPy API coverage and first-class support for the Python Array API standard. For repeated workloads, it can stage a function into a reusable, optimized program that can itself be differentiated, saved, and loaded.

Try it

python -m pip install advect
import numpy as np

import advect as ad


def energy(x):
    return np.sum(np.sin(x) ** 2)


x = np.array([0.0, 0.5, 1.0])
value, gradient = ad.value_and_grad(energy)(x)

print(f"loss: {value:.6f}")
print("gradient:", np.round(gradient, 6))
# loss: 0.937922
# gradient: [0.       0.841471 0.909297]

value_and_grad evaluates energy and differentiates it with respect to x. When the same kinds of inputs will run repeatedly, stage the function once:

program = ad.stage(energy, x)
restored = ad.StagedProgram.from_dict(program.to_dict())
print(f"restored loss: {restored(x):.6f}")
# restored loss: 0.937922

From the same code, Advect can compute JVPs, VJPs, Jacobians, Hessians, and higher-order or implicit derivatives. The core API also covers checkpointing and custom primitives. Optional integrations add SciPy and xarray workflows and bridges to other autodiff frameworks.

Related projects

Other NumPy-focused autodiff projects include HIPS Autograd and MyGrad. Advect also offers optional bridges that let a NumPy-backed function participate in JAX or PyTorch.

Learn and contribute

Start with the runnable tutorials, then use the API reference and compatibility tables for exact contracts. Contributors should begin with CONTRIBUTING.md and the developer guide.

Report security issues through GitHub's private advisory form. Advect is distributed under the MIT License.

Release files for advect 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for advect 0.2.0
File Size Uploaded
advect-0.2.0.tar.gz 472.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for advect 0.2.0
File
advect-0.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
advect-0.2.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
advect-0.2.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ ARM64 Details
advect-0.2.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
advect-0.2.0-cp314-cp314-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64 Details
advect-0.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
advect-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
advect-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details
advect-0.2.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
advect-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
advect-0.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
advect-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
advect-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
advect-0.2.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
advect-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details

Total release size: 17.5 MB

Release files / advect-0.2.0.tar.gz

Download URL advect-0.2.0.tar.gz
Size 472.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5e32a63d2809bb9bb9f069f4ba3601be38ceb44649a96e564b92d4162eefb80d
BLAKE2b-256 checksum
How to use checksums
0e3b1675cf6163555f422de06dc095cb96a1f05db7cc390ff811b1dd79e6e610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp314-cp314-win_amd64.whl

Download URL advect-0.2.0-cp314-cp314-win_amd64.whl
Size 1.1 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
8e546e2ccf940cb8c6567495faedec0b1318216a039edfd4c06a9a15d3b58449
BLAKE2b-256 checksum
How to use checksums
68658da9026595854778a38a0b2b668377df2fdaaaeb66d76f138e1b00d163d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL advect-0.2.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
913abe7ece77efe44ea492619738523cab05280cbcebc312fd745f03616fdf06
BLAKE2b-256 checksum
How to use checksums
ee1393be8aef4199997521f01d4205e1df87882da3bd9127fdaf4f7deca2c497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL advect-0.2.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
93f3dab159364e0508f1a12df846658f491e360ee881ad743928383dced0dbe4
BLAKE2b-256 checksum
How to use checksums
756ffbbcc66b19ad0379a09f67b5ee6ab90f59d154f0f8d7d1a0a6e27319bbae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL advect-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bf0801d5cfa072faf52a8b4b7b7ca90446a01bd5f60443a48bea7d2acc2d93d8
BLAKE2b-256 checksum
How to use checksums
07b9a9916c994e8c952cab8117f9cae6e8fbc9cd3708c6e19cf94f4a8926c564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp314-cp314-macosx_10_12_x86_64.whl

Download URL advect-0.2.0-cp314-cp314-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.14 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
049b85c485e8696fbf97648157975c56395ddcdc6cf23f548658eb16147ac4dc
BLAKE2b-256 checksum
How to use checksums
6073a5f9b44b281b7062e5a5749bfa361746402c088fcd84b6ddc261a24db8b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp313-cp313-win_amd64.whl

Download URL advect-0.2.0-cp313-cp313-win_amd64.whl
Size 1.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
5660400dd2b56b95d19db7d22ce2c9be468ee0b6cef2abda91b9ddd179d7b49d
BLAKE2b-256 checksum
How to use checksums
10e9ff7c91cf99b176977b866f6e95893f670395ea5ade5c5e1f2c40bf115de7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL advect-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
13ae46ce8c3426ac55c04a201b03b2e3fbb82aaaaa3f9dc1fa05ebac70cc60ec
BLAKE2b-256 checksum
How to use checksums
a3cd8af99a22a349593ba4a5d0f4d96c9c4decea07110cc5ca9030079212b018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL advect-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
6c82469422c850b3df2c05c0fa16f70c01772619c28d7dfad36996b1c1318ddb
BLAKE2b-256 checksum
How to use checksums
62f53d1337a5acd06a9b995c020e1eb9560ba757005b4f6835de51f874f60d7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL advect-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
13341589bab751eec83b326323c2f13f135fc74e04a454428caf3ca5ee6f0b05
BLAKE2b-256 checksum
How to use checksums
68e7ddfa9b31be399d64ca0675694189be4bbf9609f965eaace6ea337b63e764
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl

Download URL advect-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7f3cb14a251b7c1bc0950fd285d9ed976ec86d7a055ab15106694aff7b68bfba
BLAKE2b-256 checksum
How to use checksums
2f69b7a393ffb509777c0f4e51a4cf71e6989b842909195f0b34141a3bc9f1d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp312-cp312-win_amd64.whl

Download URL advect-0.2.0-cp312-cp312-win_amd64.whl
Size 1.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
5feb96e57e247e5ad7efbe6f92f4af59800b465c8bfce7e17d0eb007c9dddb18
BLAKE2b-256 checksum
How to use checksums
7fced91609cab4ec73aa4ae379c0464ce83a53b5d421535c812f7bbcf1c80064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL advect-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ba8f4398c5199b2d1a2192e7012f60a0c1bb20fd661e4836e2ca17cce9e6d938
BLAKE2b-256 checksum
How to use checksums
6310f8be2dd8c695243dcc1e812ff21d3ca16989a9a056d6c34babe5ece70779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL advect-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
27a4bcc634043d8d3b8897a73df7d0981e6e6d485ce0ef99fad3796941fb5e69
BLAKE2b-256 checksum
How to use checksums
ccf7d35a538b78ad1cbfeab21b9e1d30031a4f7dcc4f343a6e36fab1da05d189
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL advect-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8a7a43b7530e442f04c62c3eb34f7bdfe17502e9b168c3a187180c762b05f02c
BLAKE2b-256 checksum
How to use checksums
ea4117684a02b5d743946b61e355e7d6b40fb996cbfdd44601d1eb51dd8ac94d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / advect-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL advect-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
96a8f5099698e554f6ad7d1f0c5532bd3ee680cac9c2c60264644b1a5a246777
BLAKE2b-256 checksum
How to use checksums
f4890ec909efc9c947846968c68bd29aa2410e06ff0dcbf1ba3927515ecfbfff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

21 release files

This release

0.2.0 This release

16 release files

0.1.1

16 release files

0.1.0

16 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page