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 3.0.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 3.0.0
File Size Uploaded Provenance Actions
rsdag-3.0.0.tar.gz 325.6 kB With provenance Details for rsdag-3.0.0.tar.gz

Built distributions (wheels)

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

Total release size: 4.7 MB

Release files / rsdag-3.0.0.tar.gz

Download URL rsdag-3.0.0.tar.gz
Size 325.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d2ce40ab5ff0a43d74a07073d84b23cb1cd2c74d87c91f05ae14bcf21cf18c5e
BLAKE2b-256 checksum
How to use checksums
3a33a45b6e5bceaf7d3db60d24c01ea8f9c28a9ad212618be5d4958fe3923364
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 6, 2026.

Transparency log

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

Download URL rsdag-3.0.0-cp311-abi3-win_amd64.whl
Size 870.7 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a4778536cdc8e51f7c1ec9402d7f5efafbb070508b620ee3c2b560b42b03e016
BLAKE2b-256 checksum
How to use checksums
6c772c2b4f4abf6eb2f54cf1d6382921649ed6766fae33c90f5452d7cb7edd4f
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 6, 2026.

Transparency log

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

Download URL rsdag-3.0.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 997.9 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b98c98bb4909257b431bd884d8ba5e866f23eb8cdef845ea3be19b89c64ba5fb
BLAKE2b-256 checksum
How to use checksums
0ee5d4b134f99d76eb304e4b75eea6263f2b2623bffe353935289f988d3d3dfd
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 6, 2026.

Transparency log

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

Download URL rsdag-3.0.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 800.4 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
83977cd10dc07cdd41056f2aabaee49ecf2eaeb0769bd7465bb3da14aa68fcad
BLAKE2b-256 checksum
How to use checksums
1913bb022bd551c18b178af46515f27180380c3e36254e803769fc28396739eb
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 6, 2026.

Transparency log

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

Download URL rsdag-3.0.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.7 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
42a4d9367372d2b72e0d8b1c2079095a21d28cd01f8f00bcd30f746c0f838093
BLAKE2b-256 checksum
How to use checksums
fbd0b41f66d350d3af52dcc3e95915001d09c933114c98044adfaeb6d26d6316
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 6, 2026.

Transparency log

Security for rsdag 3.0.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-3.0.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 6, 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