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.1.1

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.1.1
File Size Uploaded
advect-0.1.1.tar.gz 471.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for advect 0.1.1
File
advect-0.1.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
advect-0.1.1-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.1.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ ARM64 Details
advect-0.1.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
advect-0.1.1-cp314-cp314-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64 Details
advect-0.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
advect-0.1.1-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.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details
advect-0.1.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
advect-0.1.1-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
advect-0.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
advect-0.1.1-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.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
advect-0.1.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
advect-0.1.1-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.1.1.tar.gz

Download URL advect-0.1.1.tar.gz
Size 471.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e6175bde3e104838cd580a43e1b08e4fa5ee74b5664182d4527df36d361aef75
BLAKE2b-256 checksum
How to use checksums
e2992352ff486aa2c9cbd6fac339aef8e7a67be4fe752f7c86ce9fa1c025cffa
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-cp314-cp314-win_amd64.whl
Size 1.1 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
d3444071b6934336bcfdce45c7e0f40157528111eaf93e050659f3a1a9a206ee
BLAKE2b-256 checksum
How to use checksums
c4ca528cbfe81c21dbf47e556dc457d02c61ab6914b5db2d5c95bcdbea804b15
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
dcb57f49a258dad558159cd121b5513311fb55f3ca768945d1360b0466162b05
BLAKE2b-256 checksum
How to use checksums
8df012f05b620b4d5484ae9c0dad8e786a72a0c5afd2cfdf4c22be34a09123c3
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
278ab81a9831232dda31e13ddc572d5f8e7bc70ae32b90e85c9f9da3cbc291d6
BLAKE2b-256 checksum
How to use checksums
862325b76a8755b42053b83fd67c367e438f4198151d13918cb340bd5fd73b89
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
27746870b2d295fbff4dfa23da7f7b6bc0292cccce1ba1a99044c2c7c05e076b
BLAKE2b-256 checksum
How to use checksums
3baedc3b811de0eec91c4217760f594602003cd327768aa9bde9e70d48f00b54
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
77b51e12389d94241be188160ea1c80c74baed7edfb976a4b303e8b39dbbc728
BLAKE2b-256 checksum
How to use checksums
c7c886209efcd106233ae4c40eb71ff9ebe1def82e9457e51c315372c0949fb4
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-cp313-cp313-win_amd64.whl
Size 1.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
8855c365bfe3e6c6061345ecb15a62e24d5f1d71d930eede0db47740f872d4db
BLAKE2b-256 checksum
How to use checksums
5fc7291b6a1da03cb95e506b879579f594c356fcffd73baa393e11ce5be47f90
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
6ce288e71c23e08f63bcabe09792b9c13b90325968fc6c5339337d00270f1156
BLAKE2b-256 checksum
How to use checksums
d1e27747937917e596f44288f0b5878f4e7006f9323b5074061ad91ec3d70092
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
9f8982e8084e88afc6eddd72940f18c68ad52a94a08fe48527547e4415305b38
BLAKE2b-256 checksum
How to use checksums
a7453753fda3a0016f66f2ff3aeb5f2f563443aa0eb1ee472ca55e665316d56c
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
c8d463d3f5dc7c892a146d76fc68c2e1c14b86df2edbd8cdcb9ba4459ae33ab9
BLAKE2b-256 checksum
How to use checksums
c0039f801d6c514db61fd66aa62e9711485f6896d84e2cbf8d1b1d49bc8eb23e
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
c62e1d8ccc3013693af0300be2f1f61a004b1edf06e277dd45e5d7ef07c94a96
BLAKE2b-256 checksum
How to use checksums
6c40b65f054b9e296d53bd291dbff78aa390140c6ed3d710798c9ad312ae0890
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-cp312-cp312-win_amd64.whl
Size 1.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
a4b5b8a764d3a4ca90e372412c1bccc58a0d150a61ea13e6905a83a083576d4e
BLAKE2b-256 checksum
How to use checksums
d5ead732ffdfb839297a6bf442be3ff4468d25bd1550883e715c9b72e0f7cdad
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
7e78d3f27153f34f2b865d8142c4827ccc0099838f3fcf919277053380938571
BLAKE2b-256 checksum
How to use checksums
e001199c0455650df94e96525284fe71898cd50f9afbe1df10cb5e3666ed5732
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
7554c76c0bce5ecb790874aea28fb83b676c611f1f97f7324bc6f89fb0fe8f14
BLAKE2b-256 checksum
How to use checksums
dcdca76da8820fa28d71bfa407f18c7bd93305cfea9413f919527f2b306331b5
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
154873aa80fb12c50f8671157cbd0b6fc9421be4d2912882e21475b7fd02cd17
BLAKE2b-256 checksum
How to use checksums
483e2e302d8c2aaa639035da1250b4b992b1f87906c9cf2bae5d4b2e6a4b0c2d
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 12, 2026.

Transparency log

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

Download URL advect-0.1.1-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
42d7f3b509c4f4e880250280cb6f71ae49400bfcebba2010f55445fb4364503d
BLAKE2b-256 checksum
How to use checksums
a631b6667eba14f78c414ee5db7fe5971923c0e9a26d9b59bea30fc98e8a8ca3
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

21 release files

0.2.0

16 release files

This release

0.1.1 This release

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