A package for computing Riemann summations in n-dimensional space
Project description
riemann
Riemann, a pure-Python package for computing Riemann sums of functions of several real variables.
Basic Usage
Riemann provides an intuitive syntax for calculating the Riemann sum of a function of several real variables over a closed multi-dimensional interval.
The below code snippet computes the Riemann sum of $f(x) = x^{2} + x$ over the interal $[0, 2]$ using 10 partitions using the left rule along the $x$-axis.
>>> import riemann
>>> from riemann import Interval
>>> f = lambda x: x ** 2 + x
>>> intervals = [Interval(0, 2, 10)]
>>> rules = [riemann.Left]
>>> riemann.riemann_sum(f, intervals, rules)
Decimal('2.28')
However, riemann is not restricted to computing Riemann sums only over one dimension. A similar syntax can be used to calculate the Riemann sum of a function of several real variables over a closed multi-dimensionl interval. Additionally, different combinations of rules can be used to compute the Riemann sum.
See Quickstart for additional example usage of the riemann module.
Features
- Fast computation of Riemann sums.
- Supports the computation of multi-dimensional Riemann sums.
- Supports the computation of the left, middle, and right Riemann sums.
- Supports the computation of the trapezoidal Riemann sum.
- Supports the computation of the upper and lower Darboux sums. (Under Development)
Requirements
Riemann requires Python 3.8+. This project does not require any additional dependencies.
Installation
$ pip install riemann
Documentation
The documentation for this project is available on Read the Docs.
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
Built Distribution
Hashes for riemann-1.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 081ef6723bd1fba055dcc2178d9245d76c233b9093b660e62f156050e280987b |
|
MD5 | 7d8ee0ed92b4ba14df9770e5593dd3de |
|
BLAKE2b-256 | fbbfe0d1aa3048912fba82818e733b9ef1c37f88308c75c7499c1e7e55d85fcf |