Numerical integrators using Numba
Project description
Numba Integrators
Numba Integrators is collection numerical integrators based on the ones in SciPy. Aim is to make them faster and much more compatible with Numba.
Table of Contents
Quick start guide
Here's how you can start numerically
The first steps
Installing
Install Numba Integrators with pip
pip install numba_integrators
Importing
Import name is the same as install name, numba_integrators
.
import numba_integrators
Example
import numba as nb
import numba_integrators as ni
import numpy as np
@nb.njit(nb.float64[:](nb.float64, nb.float64[:]))
def f(t, y):
'''Differential equation for sine wave'''
return np.array((y[1], -y[0]))
y0 = np.array((0., 1.))
solver = ni.RK45(f, 0.0, y0,
t_bound = 1, atol = 1e-8, rtol = 1e-8)
t = []
y = []
while ni.step(solver):
t.append(solver.t)
y.append(solver.y)
print(t)
print(y)
Changelog
0.1.2 2023-08-06
- Fixes
0.1.1 2023-08-05
- Initial working version
0.0.3 2023-05-14
- Inital working state
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file numba-integrators-0.1.2.tar.gz
.
File metadata
- Download URL: numba-integrators-0.1.2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9713f1b8c6bdb464d8ad5be3e90cf53206ca5be7220839aafba4187bf35500a0 |
|
MD5 | fd31106ce88dcdb53d49c400965db4bd |
|
BLAKE2b-256 | fb0fcc0d9276e9c8bfb7c5f99b6c2c7f3209ecaceb98cd15202c011d6d068321 |
File details
Details for the file numba_integrators-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: numba_integrators-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19f775679a342152e5146a414f4a7adc100a5c7f3379c66adfe896d3b8acc423 |
|
MD5 | 84c67ba8631948ced881b149e06197dc |
|
BLAKE2b-256 | b8885336b3d9ed1c2f6e2eb0057aa123f285757e46304475c4a66537642aca53 |