Skip to main content

rsdag

Python bindings for rsdag, an expression graph backend written in Rust. A Python function is traced into a hash-consed graph, differentiated symbolically and evaluated by an interpreter or as native machine code (x86-64 and AArch64).

pip install rsdag

Wheels for Linux (x86-64, aarch64), macOS (arm64 and x86-64) and Windows (x86-64), CPython 3.11 and newer.

Example

import numpy as np
from rsdag import jit, jacobian, matmul, solve

def lorenz(x, t):
    s, r, b = 10.0, 28.0, 8.0 / 3.0
    return [s * (x[1] - x[0]), x[0] * (r - x[2]) - x[1], x[0] * x[1] - b * x[2]]

f = jit(lorenz, native=True)              # traces on first call, then native
y = f(np.array([1.0, 2.0, 3.0]), 0.0)
J = jacobian(lorenz)(np.array([1.0, 2.0, 3.0]), 0.0)   # (3, 3), symbolic
Js = jacobian(lorenz, sparse=True)       # the nonzeros; Js.pattern(x, t): rows, cols
g = jit(lambda A, x: solve(A, matmul(A, x)))            # one Gemv, one Solve

jit, jacobian and grad trace on the first call and reuse the compiled program afterwards. Data-dependent Python control flow is not traceable; where(cond, a, b) with gt, lt, ... expresses elementwise conditions.

License

GNU Affero General Public License v3.0. The copyright holder licenses rsdag on other terms as well; for a commercial license contact info@milanrother.com.

Metadata

Release files for rsdag 4.1.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 rsdag 4.1.0
File Size Uploaded Provenance Actions
rsdag-4.1.0.tar.gz 342.3 kB With provenance Details for rsdag-4.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rsdag 4.1.0
File Actions
rsdag-4.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for rsdag-4.1.0-cp311-abi3-win_amd64.whl
rsdag-4.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for rsdag-4.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
rsdag-4.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for rsdag-4.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
rsdag-4.1.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.11 abi3 macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details for rsdag-4.1.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Total release size: 5.0 MB

Release files / rsdag-4.1.0.tar.gz

Download URL rsdag-4.1.0.tar.gz
Size 342.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3bf4d69a87635d27ca833086121187734e5143183fddb94e8d811a41c71d398f
BLAKE2b-256 checksum
How to use checksums
077452c7146a4bcc8c2c7405a232f9b9c0e4f6d29b1dbd3fd956062d21bb74a5
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 Oct 8, 2026.

Transparency log

Release files / rsdag-4.1.0-cp311-abi3-win_amd64.whl

Download URL rsdag-4.1.0-cp311-abi3-win_amd64.whl
Size 943.3 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
dedb0539a3c0a7740127f2c62b9e1caa86db7fbbd20aea1d1b04e3a92288ee03
BLAKE2b-256 checksum
How to use checksums
d7c7dff0fdab0525498341c2a4716350cfc94595d09c68809834de3240cd0c83
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 Oct 8, 2026.

Transparency log

Release files / rsdag-4.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL rsdag-4.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
af11b1745b3c835082b379098fd2a8a2177b6d6f89d891903fc213374e3e73a9
BLAKE2b-256 checksum
How to use checksums
203baafd5691d2b5112748c2166d6eed72f96885d35b8554b7aa3e0c33c11219
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 Oct 8, 2026.

Transparency log

Release files / rsdag-4.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL rsdag-4.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 867.3 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ef7f22dac6c9636bfdc685b897e9ad500d7043e4ff65a297c10b0a790892b056
BLAKE2b-256 checksum
How to use checksums
e885a6d12b3eeb562cf255864ece2e510d615b7bf812e280dd5bf9ebfc607f24
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 Oct 8, 2026.

Transparency log

Release files / rsdag-4.1.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL rsdag-4.1.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.8 MB
Tags CPython 3.11 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
726b2e94fdba81e8e302c475f0db3801c759986543cc706f51bbeb9f0a05e461
BLAKE2b-256 checksum
How to use checksums
34edc8a042aab76d3ad8908aee2de32d44f2aaa57b47692a553ce8e7f8c1f57e
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 Oct 8, 2026.

Transparency log

Security for rsdag 4.1.0

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for rsdag-4.1.0.tar.gz

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 Oct 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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