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.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 1.1.0
File Size Uploaded
rsdag-1.1.0.tar.gz 296.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for rsdag 1.1.0
File
rsdag-1.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
rsdag-1.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
rsdag-1.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
rsdag-1.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

Total release size: 4.0 MB

Release files / rsdag-1.1.0.tar.gz

Download URL rsdag-1.1.0.tar.gz
Size 296.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bcfdf87ef2ad060d13ae63a45a51f17c0e82fb75c01540fe752c809bdeadabda
BLAKE2b-256 checksum
How to use checksums
5c441161c7a46d88c173f5f55564052477e0925e75d16c68bb72b1c4d2508b11
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 Sep 30, 2026.

Transparency log

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

Download URL rsdag-1.1.0-cp311-abi3-win_amd64.whl
Size 726.4 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0334385dadbb668c06a7faefaf849d931554a05aad01a3d676c70eba593b16b9
BLAKE2b-256 checksum
How to use checksums
d90cf4cac7b5038e71b94b103a581087a63adbd8710d278cfe5d3fee662a287a
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 Sep 30, 2026.

Transparency log

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

Download URL rsdag-1.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 836.6 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
46c035351b8305afd20b4e7f097a4b0e95a68c2850afdd58eeb096cab83adedf
BLAKE2b-256 checksum
How to use checksums
5ddf5f398beb25eb94735ab60234af9d59f45feec3cd6e2bfd35704a5c880a67
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 Sep 30, 2026.

Transparency log

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

Download URL rsdag-1.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 697.3 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
25b7061300f878244d85601fe5e1a7f98f9b7b26a73cd86a5d1ac5b85f8e0566
BLAKE2b-256 checksum
How to use checksums
017acec851acea1608cb74ce93bc88164fd29514421c96ff0febceab8796fce3
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 Sep 30, 2026.

Transparency log

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

Download URL rsdag-1.1.0-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.4 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
3669dac8d665e022d7e029d9bd026c7de6b0573a7e6853afa869d67f7cf8d331
BLAKE2b-256 checksum
How to use checksums
9802d542da459c840208e2528914aa57a87bd7252e56c05fbe662b503bbdf8d7
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 Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

5 release files

1.0.0

5 release files

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