Skip to main content

ODE solvers usable f

Project description

Latest Version License Python Versions https://travis-ci.org/hgrecco/numbakit-ode.svg?branch=main https://coveralls.io/repos/github/hgrecco/numbakit-ode/badge.svg?branch=main Docs

numbakit-ode: leveraging numba to speed up ODE integration

numbakit-ode (nbkode) is a Python package to solve ordinary differential equations (ODE) that uses Numba to compile code and therefore speed up calculations.

The API is very similar to scipy’s integrate module therefore allowing for easy migration.

It runs in Python 3.7+ depending on NumPy, SciPy and Numba. It is licensed under BSD.

It is extremely easy and natural to use:

>>> import nbkode
>>> def func(t, y, k):
...     return -k * y
>>> t0 = 0.
>>> y0 = 1.
>>> solver = nbkode.Euler(func, t0, y0, args=(1, ))
>>> solver.run(10)

You can get a list of all solvers:

>>> import nbkode
>>> nbkode.get_solvers()

or filter by characteristics or group name (or names).

>>> nbkode.get_solvers(implicit=False, fixed_step=True)
>>> nbkode.get_solvers('euler', 'adam-bashforth')

Quick Installation

To install numbakit-ode, simply:

$ pip install numbakit-ode

or utilizing conda, with the conda-forge channel (soon):

$ conda install -c conda-forge numbakit-ode

and then simply enjoy it!

Documentation

Full documentation is available at http://numbakit-ode.readthedocs.org/

Testing

We use pytest. To run the testsuite:

$ pytest .

Benchmarks

We use airspeed velocity. To run it during development:

$ PYTHONPATH=`pwd` asv dev

Design principles

Fast: We love Numba. It allows you to write clean Python code that translates to optimized machine code at runtime. We aim to be able to leverage this power to solve a system of ordinary differential equations.

Simple but useful API: Solvers are classes easy to instantiate, with sensible defaults and convenient methods.

Correctness: We check against established libraries like SciPy that our implementation match those of established libraries using automated testing.

Data driven development: We take decisions based on data, and for this purpose we measure the performance of each part of the package, and the effect of each change we make.


numbakit-ode is maintained by a community. See AUTHORS for a complete list.

To review an ordered list of notable changes for each version of a project, see CHANGES

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

numbakit-ode-0.2.tar.gz (56.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numbakit_ode-0.2-py2.py3-none-any.whl (41.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file numbakit-ode-0.2.tar.gz.

File metadata

  • Download URL: numbakit-ode-0.2.tar.gz
  • Upload date:
  • Size: 56.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.6.10

File hashes

Hashes for numbakit-ode-0.2.tar.gz
Algorithm Hash digest
SHA256 4d5bc4aba43ba728c9fe72692b784c6a116fa73f273bbb800374c5f11a2d6f32
MD5 4b37a8eeabf0fb6c28cc03ed0aadb048
BLAKE2b-256 3675c5cebaacc15aab126200b8a8276202c9d64d1a13fe221e9bc41c6bf27d60

See more details on using hashes here.

File details

Details for the file numbakit_ode-0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: numbakit_ode-0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.6.10

File hashes

Hashes for numbakit_ode-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2f6f5c020d6579a74a67853e59eace2d186a3eb668b69e675c50128c79bbe48f
MD5 64202d05b794502bdaa94b6ac3bef49c
BLAKE2b-256 d0b0d6fa141f9a6e59c8fe96e191feb36fa35a20227e26bfea7e485f66e9e8e2

See more details on using hashes here.

Supported by

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