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 1.3.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 1.3.0
File Size Uploaded Provenance Actions
rsdag-1.3.0.tar.gz 328.0 kB With provenance Details for rsdag-1.3.0.tar.gz

Built distributions (wheels)

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

Total release size: 4.3 MB

Release files / rsdag-1.3.0.tar.gz

Download URL rsdag-1.3.0.tar.gz
Size 328.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ac8f22fbc025795f55065b93015d5fbdd9e748fb77363d5ad3aeffdb6dd6a0fd
BLAKE2b-256 checksum
How to use checksums
fc2e87d75af51be5816cd6c40d2cda60f922a86c591817d80804a51f3df82313
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 5, 2026.

Transparency log

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

Download URL rsdag-1.3.0-cp311-abi3-win_amd64.whl
Size 777.3 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
de851e0a96a4ed60735f18dd3d7ce31711f46dd0e299d772bb17904c0bc93303
BLAKE2b-256 checksum
How to use checksums
06773ee89be85cb712dccca70d502c256181c2fd2d7b35f96adaf63066d99106
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 5, 2026.

Transparency log

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

Download URL rsdag-1.3.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 898.7 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a546d5455e1310d9b2231091e7a8e87d35bccce05e811a4ac4d845f579f4ae98
BLAKE2b-256 checksum
How to use checksums
46877ed3de31ecb972c317af1f671a09e3d96dfde2619298b98122cdd3d50b94
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 5, 2026.

Transparency log

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

Download URL rsdag-1.3.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 743.6 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
4dc7be6c6692f68731e3400e4240949ecca1c0db0a2e5864f9ce6d4f25898194
BLAKE2b-256 checksum
How to use checksums
f819339c7a00e0df39429309901e99889f0678cab58eca3610ec2c5e0bc91cf4
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 5, 2026.

Transparency log

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

Download URL rsdag-1.3.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.5 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
af2d9fab21cde77a18fa005a59c4d8df2daa2f4e224baa27a56e399e69f84d3d
BLAKE2b-256 checksum
How to use checksums
421282f142f688048102f4bb6f9dc823600e5c92d40a34182d65005a9ea3480c
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 5, 2026.

Transparency log

Security for rsdag 1.3.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-1.3.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 5, 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