Skip to main content

Numerical integrators using Numba

Project description

PyPI Package latest release PyPI Wheel Supported versions Supported implementations

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.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

numba-integrators-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

numba_integrators-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file numba-integrators-0.1.1.tar.gz.

File metadata

  • Download URL: numba-integrators-0.1.1.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

Hashes for numba-integrators-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ba3a184d5494856f9442d09e9899415fa35af6058bffad1acfa38db74784ab38
MD5 fc0d47b17609f94b5823beb9fcbae411
BLAKE2b-256 03f715aab60ced17d31fb67347843dfd0c004f05f56ab3e789ec6fb9102816da

See more details on using hashes here.

File details

Details for the file numba_integrators-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for numba_integrators-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ded506a6eb85235d55ed95c76a6cd9dd5b89594157c0477c4b573d8fb87deee
MD5 5e52319074fed6ccda2db199fbf22cc3
BLAKE2b-256 3cf432eb245191fd963462d73a15dafc99b67fc172d54fa3c99c1a64e4c8a678

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page