Skip to main content

pydiffsol

Pydiffsol provides python bindings for diffsol, a Rust library for solving ordinary differential equations (ODEs) or semi-explicit differential algebraic equations (DAEs).

Equations are specified with diffsl, a domain specific language (DSL) that uses automatic differentiation to calculate the necessary jacobians, and JIT compilation using LLVM or Cranelift to generate efficient native code at runtime.

This provides the performance of Rust with the flexibility of Python. Users create a Python Ode object with DiffSL code, specifying the diffsol solver, matrix, linear solver and scalar types. All standard solver configuration settings such as tolerances, min step size, max newton steps etc. can be set through the Ode instance.

Currently supported solver types are BDF, ESDIRK34, TRBDF2 and TSIT45.

Wheels are built for linux, windows and macos.

Example usage

import pydiffsol as ds
import numpy as np

ode = ds.Ode(
    """
    in { r = 1.0 }
    k { 1.0 }
    u { 0.1 }
    F { r * u * (1.0 - u / k) }
    """,
    matrix_type=ds.nalgebra_dense,
)

# Solve up to t = 0.4, overriding r input param = 2.0
params = np.array([2.0])
solution = ode.solve(params, 0.4)
print(solution.ys, solution.ts)

# Above defaults to bdf. Try esdirk34 instead
ode.ode_solver = ds.esdirk34
solution = ode.solve(params, 0.4)
print(solution.ys, solution.ts)

Metadata

Release files for pydiffsol 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydiffsol 0.6.2
File Size Uploaded Provenance
pydiffsol-0.6.2.tar.gz 241.3 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pydiffsol 0.6.2
File
pydiffsol-0.6.2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
pydiffsol-0.6.2-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details
pydiffsol-0.6.2-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details
pydiffsol-0.6.2-cp310-abi3-macosx_14_0_arm64.whl CPython 3.10 abi3 macOS 14.0+ ARM64 Details

Total release size: 154.2 MB

Release files / pydiffsol-0.6.2.tar.gz

Download URL pydiffsol-0.6.2.tar.gz
Size 241.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b7ce2d7f27db492d42daf5ffc7dbbf0164b34b2a1a2d990559d9e5e6fc216aaa
BLAKE2b-256 checksum
How to use checksums
8abdef5ab2ade67e7957cebeee6f7c0121595f5641fba8e63c28b401751027aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pydiffsol-0.6.2-cp310-abi3-win_amd64.whl

Download URL pydiffsol-0.6.2-cp310-abi3-win_amd64.whl
Size 4.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
301accb74eb9ada15d81990ce26733a3181f5290eb56b1b34beddd403ae6a88f
BLAKE2b-256 checksum
How to use checksums
01ad579dc47cf85fd92512da7d0b3af5f050f004a151a4af1c638c038ad4c379
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pydiffsol-0.6.2-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL pydiffsol-0.6.2-cp310-abi3-manylinux_2_28_x86_64.whl
Size 54.4 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
ac012e14864f6c932c4a75285e1826f8c9d8a61aed3edbeb44fa25827014cb63
BLAKE2b-256 checksum
How to use checksums
077120ca63b2f095e94a84f096dfbec93ad79b252fae789b787b9aef046c3cd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pydiffsol-0.6.2-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL pydiffsol-0.6.2-cp310-abi3-manylinux_2_28_aarch64.whl
Size 51.0 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
1f4ceafeae40ad487522494acfb333f9b3f7afc808e116126ea5b0f4e966ca30
BLAKE2b-256 checksum
How to use checksums
d86ec9157a9cc418995627029c51a5af60d92ae394559103bdc6ab3c00715e32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / pydiffsol-0.6.2-cp310-abi3-macosx_14_0_arm64.whl

Download URL pydiffsol-0.6.2-cp310-abi3-macosx_14_0_arm64.whl
Size 44.1 MB
Tags CPython 3.10 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
b2ce26529b7597f1ef08c61c5eb9229243dc7433be79ea40dfdd2ad411747498
BLAKE2b-256 checksum
How to use checksums
2e18f31685c8d42f7173b88bff0351913a8235ac84760d4f67344af6bc01d2e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Security for pydiffsol 0.6.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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