API Reference¶
Most work begins with functions imported directly from advect. Optional
NumPy, SciPy, xarray, and host-framework integrations live in their own
modules. The tutorials teach complete workflows; these
pages collect the installed signatures and exact API contracts.
| Public API | Responsibility |
|---|---|
| Transforms | Dynamic differentiation, higher-order transforms, checkpointing, and implicit roots |
| Staging | Immutable programs, serialization, and staged differentiation |
| Primitives | Public custom-operation authoring |
| Arrays | Provider-preserving construction and tracer boundaries |
| Pytrees | Structured inputs, outputs, and custom node registration |
| Testing utilities | Numerical checks for composed functions and custom primitives |
| Support catalog | Machine-readable operation and lifetime claims |
| Errors | Public diagnostics and exception hierarchy |
| NumPy frontend | Explicit constructors and transparent NumPy namespace behavior |
| SciPy | Optional special functions, image processing, and solver callbacks |
| xarray | Optional labeled-container pytree registration |
| Host autodiff interop | Optional JAX, PyTorch, and HIPS Autograd VJP bridges |
Shared semantics¶
Dynamic transforms trace concrete values for each call and
preserve the Python control flow that ran. stage
instead compiles one shape-and-dtype signature into an immutable graph; staged
and serialized support are therefore separate claims from dynamic support.
Selected real Python scalars are lifted to zero-dimensional float64 arrays
and their derivative results return as Python scalars. Structured inputs and
outputs use pytrees. Complex differentiation is real-linear; use
jvp, vjp, or
linearize when the output is complex.
Importing advect is enough for NumPy and Array API code. SciPy, xarray, and
host-framework integrations use their own optional imports. The generated
compatibility catalog lists which calls can run
dynamically, be staged, be saved, and be differentiated.
$ █