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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| advect-0.1.0.tar.gz | 474.0 kB | Details |
Built distributions (wheels)
Total release size: 17.5 MB
Release files / advect-0.1.0.tar.gz
| Download URL | advect-0.1.0.tar.gz |
|---|---|
| Size | 474.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80734116c228fb3e2e07ded631b1a35de6de62d73050b11a52b80a1e271658c9
|
|
BLAKE2b-256 checksum How to use checksums |
3cf324df62f91f091ad7165f4c39c673170d57791c8676918833469a1816a762
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp314-cp314-win_amd64.whl
| Download URL | advect-0.1.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
22f924bf3a3d76e115508423ebd0d5eef9e544773f6032fc7935c7bb71b7d41f
|
|
BLAKE2b-256 checksum How to use checksums |
52c47f9119aa6fe4435869cb5b2cf93644680bb2845ebef24b9a1893a2897996
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | advect-0.1.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 |
facb50fa3693e00ad4a16b83905585da0d9fd0e209a7b44e0345d9d3d5ed1e28
|
|
BLAKE2b-256 checksum How to use checksums |
3a85a743b28fbffb4258b925683c55dc73a89ae5608c67faba9ee78e6ed7ab79
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | advect-0.1.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 |
e0ee2a94fa974e5da5c2f9402a7727e727166b4c979479b24f6a3aafb13b35e1
|
|
BLAKE2b-256 checksum How to use checksums |
7633dde8c1c1300927f6ad84bb172989058b149231e38ae161c0dc4b5e692703
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | advect-0.1.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 |
5bb6a3852eb39b0c9ba64f3224055e6b8c7a8a1ccb5f35352489f8acde978b9b
|
|
BLAKE2b-256 checksum How to use checksums |
9008a6d1abc77ba07d959f337bbf6f7e7215e7f2a2b8c1baf10bc804275843fb
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp314-cp314-macosx_10_12_x86_64.whl
| Download URL | advect-0.1.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 |
949b8ed4a67538ff94e819295291acd854570f96655580e2721fc5ca017fb3e5
|
|
BLAKE2b-256 checksum How to use checksums |
26719ff70a321f58f23a1b67657ad0b9eed541f6cca688ce6bf2cfde6f7bdc94
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp313-cp313-win_amd64.whl
| Download URL | advect-0.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
240598757a4e6402587b6d861f295768ab33dd07645ab93f4efa998f8a589ab9
|
|
BLAKE2b-256 checksum How to use checksums |
02ff853e83e04182ea0f5465641ae135dbe72b33c82f580571f9a3ccddfded23
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | advect-0.1.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 |
71fc85e151c9b1e1d3ab4c3f2bf3071eb68945aac860febc8f151bd0e02e882b
|
|
BLAKE2b-256 checksum How to use checksums |
901cebaac557ee5a13936dd7b18ad158ece61b46ba675a947f8c3b415bd1c00d
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | advect-0.1.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 |
a22f67843abc938741d41279d07f7d247a51237fa9bbd19e5e21eec4f12b5ced
|
|
BLAKE2b-256 checksum How to use checksums |
b1fbd23da63e8b42105f48ffd7fcc45178e22f7801b424a7ca629e8966b87bdb
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | advect-0.1.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 |
6e4e9a9a49ecc986ab88c4944c7d2be63daa7ebcb5c7a8c401337348e3b498ec
|
|
BLAKE2b-256 checksum How to use checksums |
6f3f42e406711d2727b99e4bc3d66eff7562a1fdb35780a51ed7d1dd8bc80409
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | advect-0.1.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 |
c26bca97eb9ca7845594ea1934e2e28d83f479286c2b0992df3a0e79e16472d7
|
|
BLAKE2b-256 checksum How to use checksums |
5a4dfcb9636d2f7db757f5e588726fa406494663faefbd2c6b06755c203c4eaf
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | advect-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6a3f7b46df3e82f547415a4d50d9506f627de3a663221ab8cc999c6de469b4cd
|
|
BLAKE2b-256 checksum How to use checksums |
8172314631b59889c1147fbd7f5dc0836ffc8170bbbb966a7e55b6ab0bb6c3ad
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | advect-0.1.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 |
f502b5d804b06159c9f1a015a33e68c57e640f76bbe85fcecea932b33b12706d
|
|
BLAKE2b-256 checksum How to use checksums |
e6b726b8dac7dd01e972d20d201198596a7da3a502ae83966c01b13079afaa34
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | advect-0.1.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 |
9fd22c7167bd7be1bff3f2780a53347b5785ad15525bcb7cb8b68c64ba2965c4
|
|
BLAKE2b-256 checksum How to use checksums |
638ce482a334bff788ed76beae811698302ba9882012ccf2b54bfd46f4b8d8e7
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | advect-0.1.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 |
c479126697bcd9aeb6816ba73d2d49813b20c69f650c417783600a7c27503a82
|
|
BLAKE2b-256 checksum How to use checksums |
3a48108b4e6a42196a7e5594a056107b13ac87fb554bc562b5d01783de64fddd
|
| 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 11, 2026.
Transparency logRelease files / advect-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | advect-0.1.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 |
c7a0a4a0f8194089ffb6d464fed010ebbe7bbdad5d07458642ffb2b35e23f263
|
|
BLAKE2b-256 checksum How to use checksums |
cbaca96b6c823847eaef968f69bb49e185222b5d589dc2476582f47ff66bb48e
|
| 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 11, 2026.
Transparency log