DDE numerical solvers in Python.
Project description
torchdde
torchdde is a library that provides numerical solvers in Pytorch for Delay Differential Equations (DDEs) with constant delays.
Installation
pip install git@github.com:thibmonsel/torchdde.git
or locally
git clone https://github.com/thibmonsel/torchdde.git
pip install torchdde/
Documentation
Github pages hosts the documentation at : https://thibmonsel.github.io/torchdde/
To generate the documentation locally, please look at CONTRIBUTING.MD
.
Quick example
import torch
from torchdde import integrate, RK2
def f(t, y, args, history):
return y * (1 - history[0])
solver = RK2()
delays = torch.tensor([1.0])
history_values = torch.arange(1, 5).reshape(-1, 1)
history_function = lambda t: history_values
solution = integrate(f, solver, ts[0], ts[-1], ts, y0, None, dt0=ts[1]-ts[0], delays=delays)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
torchdde-0.1.0.tar.gz
(23.4 kB
view details)
Built Distribution
torchdde-0.1.0-py3-none-any.whl
(35.9 kB
view details)
File details
Details for the file torchdde-0.1.0.tar.gz
.
File metadata
- Download URL: torchdde-0.1.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d1a8a94a684850e7b9d3461ff9b03e17d9322f1af51603db5a5d08bc55fb043 |
|
MD5 | a5ac5d5a817ec5af613f89336242b2a0 |
|
BLAKE2b-256 | 21fbeaa243b4d5ac3ec3d9b37988853cd49d145730068bdd5258f97b4134997d |
File details
Details for the file torchdde-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: torchdde-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3c8ed0569cda55144e4cf0656f6e9d3d131830b34d52defedcccb4cf664fdd3 |
|
MD5 | dbaf6c6828101e07b01b9c14a2488ebb |
|
BLAKE2b-256 | 1380db838e6daac381ea0f28e7328692fee475ef4576563c49d0e4ae66e309d5 |