legacy-quadpy


Namelegacy-quadpy JSON
Version 0.16.10 PyPI version JSON
download
home_pagehttps://github.com/zfergus/legacy-quadpy
SummaryNumerical integration, quadrature for various domains
upload_time2023-12-23 05:29:33
maintainer
docs_urlNone
authorNico Schlömer
requires_python>=3.7
licenseGPL-3.0-or-later
keywords mathematics physics engineering quadrature cubature integration numerical integration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            > ⚠️ This is a redistribution of [`quadpy`](https://github.com/sigma-py/quadpy) v0.16.10 created by [Nico Schlömer](https://github.com/nschloe) under its [original license](https://github.com/zfergus/legacy-quadpy/blob/main/LICENSE) of GNU General Public License (GPL) version 3. The original `quadpy` source code has been removed from GitHub and subsequent versions released as a closed-source Python Wheel with a paid license. This redistribution complies with the original GPLv3 license. The latest version of `quadpy` can be found [here](https://pypi.org/project/quadpy/) and installed from PyPI with `pip install quadpy`.
>
> Additionally, as `quadpy` depends on [`ndim`](https://pypi.org/project/ndim) and [`orthopy`](https://pypi.org/project/orthopy) which are also no longer available as open-source repositories, the source code for these packages has been included in this repository under the same GPLv3 license. The source code can be found in the `src/ndim` and `src/orthopy` directories, respectively. You can find stand-alone forks of these packages [here](https://github.com/diego-hayashi/ndim) and [here](https://github.com/diego-hayashi/orthopy).

<p align="center">
  <a href="https://github.com/sigma-py/quadpy"><img alt="quadpy" src="https://sigma-py.github.io/quadpy/logo-with-text.svg" width="60%"></a>
  <p align="center">Your one-stop shop for numerical integration in Python.</p>
</p>

[![PyPi Version](https://img.shields.io/pypi/v/legacy-quadpy.svg?style=flat-square)](https://pypi.org/project/legacy-quadpy/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/legacy-quadpy.svg?style=flat-square)](https://pypi.org/project/legacy-quadpy/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1173132.svg?style=flat-square)](https://doi.org/10.5281/zenodo.1173132)
[![GitHub stars](https://img.shields.io/github/stars/sigma-py/quadpy.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/sigma-py/quadpy)
[![PyPi downloads](https://img.shields.io/pypi/dm/legacy-quadpy.svg?style=flat-square)](https://pypistats.org/packages/legacy-quadpy)

<!-- [![Discord](https://img.shields.io/static/v1?logo=discord&label=chat&message=on%20discord&color=7289da&style=flat-square)](https://discord.gg/hnTJ5MRX2Y) -->
[![awesome](https://img.shields.io/badge/awesome-yes-brightgreen.svg?style=flat-square)](https://github.com/sigma-py/quadpy)

<!-- [![gh-actions](https://img.shields.io/github/workflow/status/zfergus/quadpy/ci?style=flat-square)](https://github.com/sigma-py/zfergus/actions?query=workflow%3Aci) -->
<!-- [![LGTM](https://img.shields.io/lgtm/grade/python/github/sigma-py/quadpy.svg?style=flat-square)](https://lgtm.com/projects/g/sigma-py/quadpy) -->
[![codecov](https://img.shields.io/codecov/c/github/sigma-py/quadpy.svg?style=flat-square)](https://codecov.io/gh/sigma-py/quadpy)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)

More than 1500 numerical integration schemes for
[line segments](#line-segment-c1),
[circles](#circle-u2),
[disks](#disk-s2),
[triangles](#triangle-t2),
[quadrilaterals](#quadrilateral-c2),
[spheres](#sphere-u3),
[balls](#ball-s3),
[tetrahedra](#tetrahedron-t3),
[hexahedra](#hexahedra-c3),
[wedges](#wedge-w3),
[pyramids](#pyramid-p3),
[n-spheres](#n-sphere-un),
[n-balls](#n-ball-sn),
[n-cubes](#n-cube-cn),
[n-simplices](#n-simplex-tn),
[the 1D half-space with weight functions exp(-r)](#1d-half-space-with-weight-function-exp-r-e1r),
[the 2D space with weight functions exp(-r)](#2d-space-with-weight-function-exp-r-e2r),
[the 3D space with weight functions exp(-r)](#3d-space-with-weight-function-exp-r-e3r),
[the nD space with weight functions exp(-r)](#nd-space-with-weight-function-exp-r-enr),
[the 1D space with weight functions exp(-r<sup>2</sup>)](#1d-space-with-weight-function-exp-r2-e1r2),
[the 2D space with weight functions exp(-r<sup>2</sup>)](#2d-space-with-weight-function-exp-r2-e2r2),
[the 3D space with weight functions exp(-r<sup>2</sup>)](#3d-space-with-weight-function-exp-r2-e3r2),
and
[the nD space with weight functions exp(-r<sup>2</sup>)](#nd-space-with-weight-function-exp-r2-enr2),
for fast integration of real-, complex-, and vector-valued functions.

For example, to numerically integrate any function over any given interval, install
quadpy [from the Python Package Index](https://pypi.org/project/legacy-quadpy/) with

```
pip install legacy-quadpy
```

and do

```python
import numpy as np
import quadpy


def f(x):
    return np.sin(x) - x


val, err = quadpy.quad(f, 0.0, 6.0)
```

This is like
[scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.quad.html)
with the addition that quadpy handles complex-, vector-, matrix-valued integrands,
and "intervals" in spaces of arbitrary dimension.

To integrate over a _triangle_, do

```python
import numpy as np
import quadpy


def f(x):
    return np.sin(x[0]) * np.sin(x[1])


triangle = np.array([[0.0, 0.0], [1.0, 0.0], [0.7, 0.5]])

# get a "good" scheme of degree 10
scheme = quadpy.t2.get_good_scheme(10)
val = scheme.integrate(f, triangle)
```

Most domains have `get_good_scheme(degree)`. If you would like to use a particular
scheme, you can pick one from the dictionary `quadpy.t2.schemes`.

All schemes have

<!--pytest-codeblocks:skip-->

```python
scheme.points
scheme.weights
scheme.degree
scheme.source
scheme.test_tolerance

scheme.show()
scheme.integrate(
    # ...
)
```

and many have

<!--pytest-codeblocks:skip-->

```python
scheme.points_symbolic
scheme.weights_symbolic
```

quadpy is fully vectorized, so if you like to compute the integral of a function on many
domains at once, you can provide them all in one `integrate()` call, e.g.,

<!--pytest-codeblocks:skip-->

```python
# shape (3, 5, 2), i.e., (corners, num_triangles, xy_coords)
triangles = np.stack(
    [
        [[0.0, 0.0], [1.0, 0.0], [0.0, 1.0]],
        [[1.2, 0.6], [1.3, 0.7], [1.4, 0.8]],
        [[26.0, 31.0], [24.0, 27.0], [33.0, 28]],
        [[0.1, 0.3], [0.4, 0.4], [0.7, 0.1]],
        [[8.6, 6.0], [9.4, 5.6], [7.5, 7.4]],
    ],
    axis=-2,
)
```

The same goes for functions with vectorized output, e.g.,

```python
def f(x):
    return [np.sin(x[0]), np.sin(x[1])]
```

More examples under [test/examples_test.py](test/examples_test.py).

Read more about the dimensionality of the input/output arrays [in the
wiki](https://github.com/sigma-py/quadpy/wiki#dimensionality-of-input-and-output-arrays).

Advanced topics:

- [Adaptive quadrature](https://github.com/sigma-py/quadpy/wiki/Adaptive-quadrature)
- [Creating your own Gauss scheme](https://github.com/sigma-py/quadpy/wiki/Creating-your-own-Gauss-quadrature-in-two-simple-steps)
- [tanh-sinh quadrature](https://github.com/sigma-py/tanh_sinh/)

## Schemes

### Line segment (_C<sub>1</sub>_)

<img src="https://sigma-py.github.io/quadpy/line-segment-gauss-legendre-20.svg" width="50%">

- [Chebyshev-Gauss](src/quadpy/c1/_chebyshev_gauss.py) (type 1 and 2, arbitrary degree)
- [Clenshaw-Curtis](src/quadpy/c1/_clenshaw_curtis.py) (arbitrary degree)
- [Fejér](src/quadpy/c1/_fejer.py) (type 1 and 2, arbitrary degree)
- [Gauss-Jacobi](src/quadpy/c1/_gauss_jacobi.py) (arbitrary degree)
- [Gauss-Legendre](src/quadpy/c1/_gauss_legendre.py) (arbitrary degree)
- [Gauss-Lobatto](src/quadpy/c1/_gauss_lobatto.py) (arbitrary degree)
- [Gauss-Kronrod](src/quadpy/c1/_gauss_kronrod.py) (arbitrary degree)
- [Gauss-Patterson](src/quadpy/c1/_gauss_patterson.py) (9 nested schemes up to degree 767)
- [Gauss-Radau](src/quadpy/c1/_gauss_radau.py) (arbitrary degree)
- [Newton-Cotes](src/quadpy/c1/_newton_cotes.py) (open and closed, arbitrary degree)

[See
here](https://github.com/sigma-py/quadpy/wiki/Creating-your-own-Gauss-quadrature-in-two-simple-steps)
for how to generate Gauss formulas for your own weight functions.

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.c1.gauss_patterson(5)
scheme.show()
val = scheme.integrate(lambda x: np.exp(x), [0.0, 1.0])
```

### 1D half-space with weight function exp(-r) (_E<sub>1</sub><sup>r</sup>_)

<img src="https://sigma-py.github.io/quadpy/e1r-gauss-laguerre-3.svg" width="50%">

- [Generalized Gauss-Laguerre](src/quadpy/e1r/_gauss_laguerre.py)

Example:

```python
import quadpy

scheme = quadpy.e1r.gauss_laguerre(5, alpha=0)
scheme.show()
val = scheme.integrate(lambda x: x ** 2)
```

### 1D space with weight function exp(-r<sup>2</sup>) (_E<sub>1</sub><sup>r<sup>2</sup></sup>_)

<img src="https://sigma-py.github.io/quadpy/e1r2-gauss-hermite-8.svg" width="50%">

- [Gauss-Hermite](src/quadpy/e1r2/_gauss_hermite.py) (arbitrary degree)
- [Genz-Keister](src/quadpy/e1r2/_genz_keister.py) (1996, 8 nested schemes up to degree 67)

Example:

```python
import quadpy

scheme = quadpy.e1r2.gauss_hermite(5)
scheme.show()
val = scheme.integrate(lambda x: x ** 2)
```

### Circle (_U<sub>2</sub>_)

<img src="https://sigma-py.github.io/quadpy/circle-krylov-30.svg" width="25%">

- [Krylov](src/quadpy/u2/_krylov.py) (1959, arbitrary degree)

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.u2.get_good_scheme(7)
scheme.show()
val = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0], 1.0)
```

### Triangle (_T<sub>2</sub>_)

<img src="https://sigma-py.github.io/quadpy/triangle-dunavant-15.svg" width="25%">

Apart from the classical centroid, vertex, and seven-point schemes we have

- [Hammer-Marlowe-Stroud](src/quadpy/t2/_hammer_marlowe_stroud.py) (1956, 5 schemes up to
  degree 5)
- [Albrecht-Collatz](src/quadpy/t2/_albrecht_collatz.py) (1958, degree 3)
- [Stroud](src/quadpy/t2/_stroud.py) (1971, conical product scheme of degree 7)
- [Franke](src/quadpy/t2/_franke.py) (1971, 2 schemes of degree 7)
- [Strang-Fix/Cowper](src/quadpy/t2/_strang_fix_cowper) (1973, 10 schemes up to degree
  7),
- [Lyness-Jespersen](src/quadpy/t2/_lyness_jespersen.py) (1975, 21 schemes up to degree 11,
  two of which are used in [TRIEX](https://doi.org/10.1145/356068.356070)),
- [Lether](src/quadpy/t2/_lether.py) (1976, degree 2n-2, arbitrary n, not symmetric),
- [Hillion](src/quadpy/t2/_hillion.py) (1977, 10 schemes up to degree 3),
- [Laursen-Gellert](src/quadpy/t2/_laursen_gellert) (1978, 17 schemes up to degree 10),
- [CUBTRI](src/quadpy/t2/_cubtri) (Laurie, 1982, degree 8),
- [Dunavant](src/quadpy/t2/_dunavant) (1985, 20 schemes up to degree 20),
- [Cools-Haegemans](src/quadpy/t2/_cools_haegemans) (1987, degrees 8 and 11),
- [Gatermann](src/quadpy/t2/_gatermann) (1988, degree 7)
- [Berntsen-Espelid](src/quadpy/t2/_berntsen_espelid) (1990, 4 schemes of degree 13, the
  first one being [DCUTRI](https://doi.org/10.1145/131766.131772)),
- [Liu-Vinokur](src/quadpy/t2/_liu_vinokur.py) (1998, 13 schemes up to degree 5),
- [Griener-Schmid](src/quadpy/t2/_griener_schmid), (1999, 2 schemes of degree 6),
- [Walkington](src/quadpy/t2/_walkington.py) (2000, 5 schemes up to degree 5),
- [Wandzura-Xiao](src/quadpy/t2/_wandzura_xiao) (2003, 6 schemes up to degree 30),
- [Taylor-Wingate-Bos](src/quadpy/t2/_taylor_wingate_bos) (2005, 5 schemes up to degree
  14),
- [Zhang-Cui-Liu](src/quadpy/t2/_zhang_cui_liu) (2009, 3 schemes up to degree 20),
- [Xiao-Gimbutas](src/quadpy/t2/_xiao_gimbutas) (2010, 50 schemes up to degree 50),
- [Vioreanu-Rokhlin](src/quadpy/t2/_vioreanu_rokhlin) (2014, 20 schemes up to degree 62),
- [Williams-Shunn-Jameson](src/quadpy/t2/_williams_shunn_jameson) (2014, 8 schemes up to
  degree 12),
- [Witherden-Vincent](src/quadpy/t2/_witherden_vincent) (2015, 19 schemes up to degree 20),
- [Papanicolopulos](src/quadpy/t2/_papanicolopulos) (2016, 27 schemes up to degree 25),
- [all schemes for the n-simplex](#n-simplex-tn).

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.t2.get_good_scheme(12)
scheme.show()
val = scheme.integrate(lambda x: np.exp(x[0]), [[0.0, 0.0], [1.0, 0.0], [0.5, 0.7]])
```

### Disk (_S<sub>2</sub>_)

<img src="https://sigma-py.github.io/quadpy/disk-hammer-stroud-20.svg" width="25%">

- [Radon](src/quadpy/s2/_radon.py) (1948, degree 5)
- [Peirce](src/quadpy/s2/_peirce_1956.py) (1956, 3 schemes up to degree 11)
- [Peirce](src/quadpy/s2/_peirce_1957.py) (1957, arbitrary degree)
- [Albrecht-Collatz](src/quadpy/s2/_albrecht_collatz.py) (1958, degree 3)
- [Hammer-Stroud](src/quadpy/s2/_hammer_stroud.py) (1958, 8 schemes up to degree 15)
- [Albrecht](src/quadpy/s2/_albrecht.py) (1960, 8 schemes up to degree 17)
- [Mysovskih](src/quadpy/s2/_mysovskih.py) (1964, 3 schemes up to degree 15)
- [Rabinowitz-Richter](src/quadpy/s2/_rabinowitz_richter) (1969, 6 schemes up to degree 15)
- [Lether](src/quadpy/s2/_lether.py) (1971, arbitrary degree)
- [Piessens-Haegemans](src/quadpy/s2/_piessens_haegemans/) (1975, 1 scheme of degree 9)
- [Haegemans-Piessens](src/quadpy/s2/_haegemans_piessens/) (1977, degree 9)
- [Cools-Haegemans](src/quadpy/s2/_cools_haegemans/) (1985, 4 schemes up to degree 13)
- [Wissmann-Becker](src/quadpy/s2/_wissmann_becker.py) (1986, 3 schemes up to degree 8)
- [Kim-Song](src/quadpy/s2/_kim_song/) (1997, 15 schemes up to degree 17)
- [Cools-Kim](src/quadpy/s2/_cools_kim/) (2000, 3 schemes up to degree 21)
- [Luo-Meng](src/quadpy/s2/_luo_meng/) (2007, 6 schemes up to degree 17)
- [all schemes from the n-ball](#n-ball-sn)

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.s2.get_good_scheme(6)
scheme.show()
val = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0], 1.0)
```

### Quadrilateral (_C<sub>2</sub>_)

<img src="https://sigma-py.github.io/quadpy/quad-maxwell.svg" width="25%">

- [Maxwell](src/quadpy/c2/_maxwell.py) (1890, degree 7)
- [Burnside](src/quadpy/c2/_burnside.py) (1908, degree 5)
- [Irwin](src/quadpy/c2/_irwin.py) (1923, 3 schemes up to degree 5)
- [Tyler](src/quadpy/c2/_tyler.py) (1953, 3 schemes up to degree 7)
- [Hammer-Stroud](src/quadpy/c2/_hammer_stroud.py) (1958, 3 schemes up to degree 7)
- [Albrecht-Collatz](src/quadpy/c2/_albrecht_collatz.py) (1958, 4 schemes up to degree 5)
- [Miller](src/quadpy/c2/_miller.py) (1960, degree 1, degree 11 for harmonic integrands)
- [Meister](src/quadpy/c2/_meister.py) (1966, degree 7)
- [Phillips](src/quadpy/c2/_phillips.py) (1967, degree 7)
- [Rabinowitz-Richter](src/quadpy/c2/_rabinowitz_richter) (1969, 6 schemes up to degree 15)
- [Franke](src/quadpy/c2/_franke.py) (1971, 10 schemes up to degree 9)
- [Piessens-Haegemans](src/quadpy/c2/_piessens_haegemans) (1975, 2 schemes of degree 9)
- [Haegemans-Piessens](src/quadpy/c2/_haegemans_piessens) (1977, degree 7)
- [Schmid](src/quadpy/c2/_schmid) (1978, 3 schemes up to degree 6)
- [Cools-Haegemans](src/quadpy/c2/_cools_haegemans_1985/) (1985, 6 schemes up to degree 17)
- [Dunavant](src/quadpy/c2/_dunavant) (1985, 11 schemes up to degree 19)
- [Morrow-Patterson](src/quadpy/c2/_morrow_patterson) (1985, 2 schemes up to degree 20, single precision)
- [Cohen-Gismalla](src/quadpy/c2/_cohen_gismalla.py), (1986, 2 schemes up to degree 3)
- [Wissmann-Becker](src/quadpy/c2/_wissmann_becker) (1986, 6 schemes up to degree 8)
- [Cools-Haegemans](src/quadpy/c2/_cools_haegemans_1988) (1988, 2 schemes up to degree 13)
- [Waldron](src/quadpy/c2/_waldron.py) (1994, infinitely many schemes of degree 3)
- [Sommariva](src/quadpy/c2/_sommariva) (2012, 55 schemes up to degree 55)
- [Witherden-Vincent](src/quadpy/c2/_witherden_vincent) (2015, 11 schemes up to degree 21)
- products of line segment schemes
- [all schemes from the n-cube](#n-cube-cn)

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.c2.get_good_scheme(7)
val = scheme.integrate(
    lambda x: np.exp(x[0]),
    [[[0.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]]],
)
```

The points are specified in an array of shape (2, 2, ...) such that `arr[0][0]`
is the lower left corner, `arr[1][1]` the upper right. If your c2
has its sides aligned with the coordinate axes, you can use the convenience
function

<!--pytest-codeblocks:skip-->

```python
quadpy.c2.rectangle_points([x0, x1], [y0, y1])
```

to generate the array.

### 2D space with weight function exp(-r) (_E<sub>2</sub><sup>r</sup>_)

<img src="https://sigma-py.github.io/quadpy/e2r-rabinowitz-richter-5.svg" width="25%">

- [Stroud-Secrest](src/quadpy/e2r/_stroud_secrest.py) (1963, 2 schemes up to degree 7)
- [Rabinowitz-Richter](src/quadpy/e2r/_rabinowitz_richter) (1969, 4 schemes up to degree 15)
- [Stroud](src/quadpy/e2r/_stroud.py) (1971, degree 4)
- [Haegemans-Piessens](src/quadpy/e2r/_haegemans_piessens/) (1977, 2 schemes up to degree 9)
- [Cools-Haegemans](src/quadpy/e2r/_cools_haegemans/) (1985, 3 schemes up to degree 13)
- [all schemes from the nD space with weight function exp(-r)](#nd-space-with-weight-function-exp-r-enr)

Example:

```python
import quadpy

scheme = quadpy.e2r.get_good_scheme(5)
scheme.show()
val = scheme.integrate(lambda x: x[0] ** 2)
```

### 2D space with weight function exp(-r<sup>2</sup>) (_E<sub>2</sub><sup>r<sup>2</sup></sup>_)

<img src="https://sigma-py.github.io/quadpy/e2r2-rabinowitz-richter-3.svg" width="25%">

- [Stroud-Secrest](src/quadpy/e2r2/_stroud_secrest.py) (1963, 2 schemes up to degree 7)
- [Rabinowitz-Richter](src/quadpy/e2r2/_rabinowitz_richter/) (1969, 5 schemes up to degree 15)
- [Stroud](src/quadpy/e2r2/_stroud.py) (1971, 3 schemes up to degree 7)
- [Haegemans-Piessens](src/quadpy/e2r2/_haegemans_piessens/) (1977, 2 schemes of degree 9)
- [Cools-Haegemans](src/quadpy/e2r2/_cools_haegemans/) (1985, 3 schemes up to degree 13)
- [all schemes from the nD space with weight function exp(-r<sup>2</sup>)](#nd-space-with-weight-function-exp-r2-enr2)

Example:

```python
import quadpy

scheme = quadpy.e2r2.get_good_scheme(3)
scheme.show()
val = scheme.integrate(lambda x: x[0] ** 2)
```

### Sphere (_U<sub>3</sub>_)

<img src="https://sigma-py.github.io/quadpy/sphere.png" width="25%">

- [Albrecht-Collatz](src/quadpy/u3/_albrecht_collatz.py) (1958, 5 schemes up to degree 7)
- [McLaren](src/quadpy/u3/_mclaren.py) (1963, 10 schemes up to degree 14)
- [Lebedev](src/quadpy/u3/_lebedev/) (1976, 34 schemes up to degree 131)
- [Bažant-Oh](src/quadpy/u3/_bazant_oh/) (1986, 3 schemes up to degree 13)
- [Heo-Xu](src/quadpy/u3/_heo_xu/) (2001, 27 schemes up to degree 39)
- [Fliege-Maier](src/quadpy/u3/_fliege_maier/) (2007, 4 schemes up to degree 4,
  single-precision)
- [all schemes from the n-sphere](#n-sphere-un)

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.u3.get_good_scheme(19)
# scheme.show()
val = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0, 0.0], 1.0)
```

Integration on the sphere can also be done for functions defined in spherical
coordinates:

```python
import numpy as np
import quadpy


def f(theta_phi):
    theta, phi = theta_phi
    return np.sin(phi) ** 2 * np.sin(theta)


scheme = quadpy.u3.get_good_scheme(19)
val = scheme.integrate_spherical(f)
```

### Ball (_S<sub>3</sub>_)

<img src="https://sigma-py.github.io/quadpy/ball.png" width="25%">

- [Ditkin](src/quadpy/s3/_ditkin.py) (1948, 3 schemes up to degree 7)
- [Hammer-Stroud](src/quadpy/s3/_hammer_stroud.py) (1958, 6 schemes up to degree 7)
- [Mysovskih](src/quadpy/s3/_mysovskih.py) (1964, degree 7)
- [Stroud](src/quadpy/s3/_stroud.py) (1971, 2 schemes up to degree 14)
- [all schemes from the n-ball](#n-ball-sn)

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.s3.get_good_scheme(4)
# scheme.show()
val = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0, 0.0], 1.0)
```

### Tetrahedron (_T<sub>3</sub>_)

<img src="https://sigma-py.github.io/quadpy/tet.png" width="25%">

- [Hammer-Marlowe-Stroud](src/quadpy/t3/_hammer_marlowe_stroud.py)
  (1956, 3 schemes up to degree 3, also appearing in [Hammer-Stroud](https://doi.org/10.1090/S0025-5718-1958-0102176-6))
- [Stroud](src/quadpy/t3/_stroud.py) (1971, degree 7)
- [Yu](src/quadpy/t3/_yu) (1984, 5 schemes up to degree 6)
- [Keast](src/quadpy/t3/_keast) (1986, 10 schemes up to degree 8)
- [Beckers-Haegemans](src/quadpy/t3/_beckers_haegemans) (1990, degrees 8 and 9)
- [Gatermann](src/quadpy/t3/_gatermann) (1992, degree 5)
- [Liu-Vinokur](src/quadpy/t3/_liu_vinokur.py) (1998, 14 schemes up to degree 5)
- [Walkington](src/quadpy/t3/_walkington/) (2000, 6 schemes up to degree 7)
- [Zhang-Cui-Liu](src/quadpy/t3/_zhang_cui_liu/) (2009, 2 schemes up to degree 14)
- [Xiao-Gimbutas](src/quadpy/t3/_xiao_gimbutas/) (2010, 15 schemes up to degree 15)
- [Shunn-Ham](src/quadpy/t3/_shunn_ham/) (2012, 6 schemes up to degree 7)
- [Vioreanu-Rokhlin](src/quadpy/t3/_vioreanu_rokhlin/) (2014, 10 schemes up to degree 13)
- [Williams-Shunn-Jameson](src/quadpy/t3/_williams_shunn_jameson/) (2014, 1 scheme with
  degree 9)
- [Witherden-Vincent](src/quadpy/t3/_witherden_vincent/) (2015, 9 schemes up to degree 10)
- [Jaśkowiec-Sukumar](src/quadpy/t3/_jaskowiec_sukumar/) (2020, 21 schemes up to degree 20)
- [all schemes for the n-simplex](#n-simplex-tn).

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.t3.get_good_scheme(5)
# scheme.show()
val = scheme.integrate(
    lambda x: np.exp(x[0]),
    [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.5, 0.7, 0.0], [0.3, 0.9, 1.0]],
)
```

### Hexahedron (_C<sub>3</sub>_)

<img src="https://sigma-py.github.io/quadpy/hexa.png" width="25%">

- [Sadowsky](src/quadpy/c3/_sadowsky.py) (1940, degree 5)
- [Tyler](src/quadpy/c3/_tyler.py) (1953, 2 schemes up to degree 5)
- [Hammer-Wymore](src/quadpy/c3/_hammer_wymore.py) (1957, degree 7)
- [Albrecht-Collatz](src/quadpy/c3/_albrecht_collatz.py) (1958, degree 3)
- [Hammer-Stroud](src/quadpy/c3/_hammer_stroud.py) (1958, 6 schemes up to degree 7)
- [Mustard-Lyness-Blatt](src/quadpy/c3/_mustard_lyness_blatt.py) (1963, 6 schemes up to degree 5)
- [Stroud](src/quadpy/c3/_stroud_1967.py) (1967, degree 5)
- [Sarma-Stroud](src/quadpy/c3/_sarma_stroud.py) (1969, degree 7)
- [Witherden-Vincent](src/quadpy/c3/_witherden_vincent/) (2015, 7 schemes up to degree degree 11)
- [all schemes from the n-cube](#n-cube-cn)
- Product schemes derived from line segment schemes

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.c3.product(quadpy.c1.newton_cotes_closed(3))
# scheme.show()
val = scheme.integrate(
    lambda x: np.exp(x[0]),
    quadpy.c3.cube_points([0.0, 1.0], [-0.3, 0.4], [1.0, 2.1]),
)
```

### Pyramid (_P<sub>3</sub>_)

<img src="https://sigma-py.github.io/quadpy/pyra.png" width="25%">

- [Felippa](src/quadpy/p3/_felippa.py) (2004, 9 schemes up to degree 5)

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.p3.felippa_5()

val = scheme.integrate(
    lambda x: np.exp(x[0]),
    [
        [0.0, 0.0, 0.0],
        [1.0, 0.0, 0.0],
        [0.5, 0.7, 0.0],
        [0.3, 0.9, 0.0],
        [0.0, 0.1, 1.0],
    ],
)
```

### Wedge (_W<sub>3</sub>_)

<img src="https://sigma-py.github.io/quadpy/wedge.png" width="15%">

- [Felippa](src/quadpy/w3/_felippa.py) (2004, 6 schemes up to degree 6)
- [Kubatko-Yeager-Maggi](src/quadpy/w3/_kubatko_yeager_maggi.py) (2013, 21 schemes up to
  degree 9)

Example:

```python
import numpy as np
import quadpy

scheme = quadpy.w3.felippa_3()
val = scheme.integrate(
    lambda x: np.exp(x[0]),
    [
        [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.5, 0.7, 0.0]],
        [[0.0, 0.0, 1.0], [1.0, 0.0, 1.0], [0.5, 0.7, 1.0]],
    ],
)
```

### 3D space with weight function exp(-r) (_E<sub>3</sub><sup>r</sup>_)

<img src="https://sigma-py.github.io/quadpy/e3r.png" width="25%">

- [Stroud-Secrest](src/quadpy/e3r/_stroud_secrest.py) (1963, 5 schemes up to degree 7)
- [all schemes from the nD space with weight function
  exp(-r)](#nd-space-with-weight-function-exp-r-enr)

Example:

```python
import quadpy

scheme = quadpy.e3r.get_good_scheme(5)
# scheme.show()
val = scheme.integrate(lambda x: x[0] ** 2)
```

### 3D space with weight function exp(-r<sup>2</sup>) (_E<sub>3</sub><sup>r<sup>2</sup></sup>_)

<img src="https://sigma-py.github.io/quadpy/e3r2.png" width="25%">

- [Stroud-Secrest](src/quadpy/e3r/_stroud_secrest.py) (1963, 7 schemes up to degree 7)
- [Stroud](src/quadpy/e3r/_stroud.py) (1971, scheme of degree 14)
- [all schemes from the nD space with weight function
  exp(-r<sup>2</sup>)](#nd-space-with-weight-function-exp-r2-enr2)

Example:

```python
import quadpy

scheme = quadpy.e3r2.get_good_scheme(6)
# scheme.show()
val = scheme.integrate(lambda x: x[0] ** 2)
```

### n-Simplex (_T<sub>n</sub>_)

- [Lauffer](src/quadpy/tn/_lauffer.py) (1955, 5 schemes up to degree 5)
- [Hammer-Stroud](src/quadpy/tn/_hammer_stroud.py) (1956, 3 schemes up to degree 3)
- [Stroud](src/quadpy/tn/_stroud_1964.py) (1964, degree 3)
- [Stroud](src/quadpy/tn/_stroud_1966.py) (1966, 7 schemes of degree 3)
- [Stroud](src/quadpy/tn/_stroud_1969.py) (1969, degree 5)
- [Silvester](src/quadpy/tn/_silvester.py) (1970, arbitrary degree),
- [Grundmann-Möller](src/quadpy/tn/_grundmann_moeller.py) (1978, arbitrary degree)
- [Walkington](src/quadpy/tn/_walkington.py) (2000, 5 schemes up to degree 7)

Example:

```python
import numpy as np
import quadpy

dim = 4
scheme = quadpy.tn.grundmann_moeller(dim, 3)
val = scheme.integrate(
    lambda x: np.exp(x[0]),
    np.array(
        [
            [0.0, 0.0, 0.0, 0.0],
            [1.0, 2.0, 0.0, 0.0],
            [0.0, 1.0, 0.0, 0.0],
            [0.0, 3.0, 1.0, 0.0],
            [0.0, 0.0, 4.0, 1.0],
        ]
    ),
)
```

### n-Sphere (_U<sub>n</sub>_)

- [Stroud](src/quadpy/un/_stroud_1967.py) (1967, degree 7)
- [Stroud](src/quadpy/un/_stroud_1969.py) (1969, 3 <= n <= 16, degree 11)
- [Stroud](src/quadpy/un/_stroud.py) (1971, 6 schemes up to degree 5)
- [Dobrodeev](src/quadpy/un/_dobrodeev_1978.py) (1978, n >= 2, degree 5)
- [Mysovskikh](src/quadpy/un/_mysovskikh.py) (1980, 2 schemes up to degree 5)

Example:

```python
import numpy as np
import quadpy

dim = 4
scheme = quadpy.un.dobrodeev_1978(dim)
val = scheme.integrate(lambda x: np.exp(x[0]), np.zeros(dim), 1.0)
```

### n-Ball (_S<sub>n</sub>_)

- [Stroud](src/quadpy/sn/_stroud_1957.py) (1957, degree 2)
- [Hammer-Stroud](src/quadpy/sn/_hammer_stroud.py) (1958, 2 schemes up to degree 5)
- [Stroud](src/quadpy/sn/_stroud_1966.py) (1966, 4 schemes of degree 5)
- [Stroud](src/quadpy/sn/_stroud_1967_5.py) (1967, 4 <= n <= 7, 2 schemes of degree 5)
- [Stroud](src/quadpy/sn/_stroud_1967_7.py) (1967, n >= 3, 3 schemes of degree 7)
- [Stenger](src/quadpy/sn/_stenger.py) (1967, 6 schemes up to degree 11)
- [McNamee-Stenger](src/quadpy/sn/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)
- [Dobrodeev](src/quadpy/sn/_dobrodeev_1970.py) (1970, n >= 3, degree 7)
- [Dobrodeev](src/quadpy/sn/_dobrodeev_1978.py) (1978, 2 <= n <= 20, degree 5)
- [Stoyanova](src/quadpy/sn/_stoyanova.py) (1997, n >= 5, degree 7)

Example:

```python
import numpy as np
import quadpy

dim = 4
scheme = quadpy.sn.dobrodeev_1970(dim)
val = scheme.integrate(lambda x: np.exp(x[0]), np.zeros(dim), 1.0)
```

### n-Cube (_C<sub>n</sub>_)

- [Ewing](src/quadpy/cn/_ewing.py) (1941, degree 3)
- [Tyler](src/quadpy/cn/_tyler.py) (1953, degree 3)
- [Stroud](src/quadpy/cn/_stroud_1957.py) (1957, 2 schemes up to degree 3)
- [Hammer-Stroud](src/quadpy/cn/_hammer_stroud.py) (1958, degree 5)
- [Mustard-Lyness-Blatt](src/quadpy/cn/_mustard_lyness_blatt.py) (1963, degree 5)
- [Thacher](src/quadpy/cn/_thacher.py) (1964, degree 2)
- [Stroud](src/quadpy/cn/_stroud_1966.py) (1966, 4 schemes of degree 5)
- [Phillips](src/quadpy/cn/_phillips.py) (1967, degree 7)
- [McNamee-Stenger](src/quadpy/cn/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)
- [Stroud](src/quadpy/cn/_stroud_1968.py) (1968, degree 5)
- [Dobrodeev](src/quadpy/cn/_dobrodeev_1970.py) (1970, n >= 5, degree 7)
- [Dobrodeev](src/quadpy/cn/_dobrodeev_1978.py) (1978, n >= 2, degree 5)
- [Cools-Haegemans](src/quadpy/cn/_cools_haegemans.py) (1994, 2 schemes up to degree 5)

Example:

```python
import numpy as np
import quadpy

dim = 4
scheme = quadpy.cn.stroud_cn_3_3(dim)
val = scheme.integrate(
    lambda x: np.exp(x[0]),
    quadpy.cn.ncube_points([0.0, 1.0], [0.1, 0.9], [-1.0, 1.0], [-1.0, -0.5]),
)
```

### nD space with weight function exp(-r) (_E<sub>n</sub><sup>r</sup>_)

- [Stroud-Secrest](src/quadpy/enr/_stroud_secrest.py) (1963, 4 schemes up to degree 5)
- [McNamee-Stenger](src/quadpy/enr/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)
- [Stroud](src/quadpy/enr/_stroud.py) (1971, 2 schemes up to degree 5)

Example:

```python
import quadpy

dim = 4
scheme = quadpy.enr.stroud_enr_5_4(dim)
val = scheme.integrate(lambda x: x[0] ** 2)
```

### nD space with weight function exp(-r<sup>2</sup>) (_E<sub>n</sub><sup>r<sup>2</sup></sup>_)

- [Stroud-Secrest](src/quadpy/enr2/_stroud_secrest.py) (1963, 4 schemes up to degree 5)
- [McNamee-Stenger](src/quadpy/enr2/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)
- [Stroud](src/quadpy/enr2/_stroud_1967_5.py) (1967, 2 schemes of degree 5)
- [Stroud](src/quadpy/enr2/_stroud_1967_7.py) (1967, 3 schemes of degree 7)
- [Stenger](src/quadpy/enr2/_stenger.py) (1971, 6 schemes up to degree 11, varying dimensionality restrictions)
- [Stroud](src/quadpy/enr2/_stroud.py) (1971, 5 schemes up to degree 5)
- [Phillips](src/quadpy/enr2/_phillips.py) (1980, degree 5)
- [Cools-Haegemans](src/quadpy/enr2/_cools_haegemans.py) (1994, 3 schemes up to degree 7)
- [Lu-Darmofal](src/quadpy/enr2/_lu_darmofal.py) (2004, degree 5)
- [Xiu](src/quadpy/enr2/_xiu.py) (2008, degree 2)

Example:

```python
import quadpy

dim = 4
scheme = quadpy.enr2.stroud_enr2_5_2(dim)
val = scheme.integrate(lambda x: x[0] ** 2)
```

### Installation

quadpy is [available from the Python Package Index](https://pypi.org/project/quadpy/), so with

```
pip install quadpy
```

you can install.

### Testing

To run the tests, check out this repository and type

```
MPLBACKEND=Agg pytest
```

### License

This software is published under the [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zfergus/legacy-quadpy",
    "name": "legacy-quadpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "mathematics,physics,engineering,quadrature,cubature,integration,numerical integration",
    "author": "Nico Schl\u00f6mer",
    "author_email": "nico.schloemer@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/be/57/ad2f9240d32adec95c639b66ce77ed5ed0ebb4e16bdfc27846a39d735045/legacy-quadpy-0.16.10.tar.gz",
    "platform": null,
    "description": "> \u26a0\ufe0f This is a redistribution of [`quadpy`](https://github.com/sigma-py/quadpy) v0.16.10 created by [Nico Schl\u00f6mer](https://github.com/nschloe) under its [original license](https://github.com/zfergus/legacy-quadpy/blob/main/LICENSE) of GNU General Public License (GPL) version 3. The original `quadpy` source code has been removed from GitHub and subsequent versions released as a closed-source Python Wheel with a paid license. This redistribution complies with the original GPLv3 license. The latest version of `quadpy` can be found [here](https://pypi.org/project/quadpy/) and installed from PyPI with `pip install quadpy`.\n>\n> Additionally, as `quadpy` depends on [`ndim`](https://pypi.org/project/ndim) and [`orthopy`](https://pypi.org/project/orthopy) which are also no longer available as open-source repositories, the source code for these packages has been included in this repository under the same GPLv3 license. The source code can be found in the `src/ndim` and `src/orthopy` directories, respectively. You can find stand-alone forks of these packages [here](https://github.com/diego-hayashi/ndim) and [here](https://github.com/diego-hayashi/orthopy).\n\n<p align=\"center\">\n  <a href=\"https://github.com/sigma-py/quadpy\"><img alt=\"quadpy\" src=\"https://sigma-py.github.io/quadpy/logo-with-text.svg\" width=\"60%\"></a>\n  <p align=\"center\">Your one-stop shop for numerical integration in Python.</p>\n</p>\n\n[![PyPi Version](https://img.shields.io/pypi/v/legacy-quadpy.svg?style=flat-square)](https://pypi.org/project/legacy-quadpy/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/legacy-quadpy.svg?style=flat-square)](https://pypi.org/project/legacy-quadpy/)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1173132.svg?style=flat-square)](https://doi.org/10.5281/zenodo.1173132)\n[![GitHub stars](https://img.shields.io/github/stars/sigma-py/quadpy.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/sigma-py/quadpy)\n[![PyPi downloads](https://img.shields.io/pypi/dm/legacy-quadpy.svg?style=flat-square)](https://pypistats.org/packages/legacy-quadpy)\n\n<!-- [![Discord](https://img.shields.io/static/v1?logo=discord&label=chat&message=on%20discord&color=7289da&style=flat-square)](https://discord.gg/hnTJ5MRX2Y) -->\n[![awesome](https://img.shields.io/badge/awesome-yes-brightgreen.svg?style=flat-square)](https://github.com/sigma-py/quadpy)\n\n<!-- [![gh-actions](https://img.shields.io/github/workflow/status/zfergus/quadpy/ci?style=flat-square)](https://github.com/sigma-py/zfergus/actions?query=workflow%3Aci) -->\n<!-- [![LGTM](https://img.shields.io/lgtm/grade/python/github/sigma-py/quadpy.svg?style=flat-square)](https://lgtm.com/projects/g/sigma-py/quadpy) -->\n[![codecov](https://img.shields.io/codecov/c/github/sigma-py/quadpy.svg?style=flat-square)](https://codecov.io/gh/sigma-py/quadpy)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)\n\nMore than 1500 numerical integration schemes for\n[line segments](#line-segment-c1),\n[circles](#circle-u2),\n[disks](#disk-s2),\n[triangles](#triangle-t2),\n[quadrilaterals](#quadrilateral-c2),\n[spheres](#sphere-u3),\n[balls](#ball-s3),\n[tetrahedra](#tetrahedron-t3),\n[hexahedra](#hexahedra-c3),\n[wedges](#wedge-w3),\n[pyramids](#pyramid-p3),\n[n-spheres](#n-sphere-un),\n[n-balls](#n-ball-sn),\n[n-cubes](#n-cube-cn),\n[n-simplices](#n-simplex-tn),\n[the 1D half-space with weight functions exp(-r)](#1d-half-space-with-weight-function-exp-r-e1r),\n[the 2D space with weight functions exp(-r)](#2d-space-with-weight-function-exp-r-e2r),\n[the 3D space with weight functions exp(-r)](#3d-space-with-weight-function-exp-r-e3r),\n[the nD space with weight functions exp(-r)](#nd-space-with-weight-function-exp-r-enr),\n[the 1D space with weight functions exp(-r<sup>2</sup>)](#1d-space-with-weight-function-exp-r2-e1r2),\n[the 2D space with weight functions exp(-r<sup>2</sup>)](#2d-space-with-weight-function-exp-r2-e2r2),\n[the 3D space with weight functions exp(-r<sup>2</sup>)](#3d-space-with-weight-function-exp-r2-e3r2),\nand\n[the nD space with weight functions exp(-r<sup>2</sup>)](#nd-space-with-weight-function-exp-r2-enr2),\nfor fast integration of real-, complex-, and vector-valued functions.\n\nFor example, to numerically integrate any function over any given interval, install\nquadpy [from the Python Package Index](https://pypi.org/project/legacy-quadpy/) with\n\n```\npip install legacy-quadpy\n```\n\nand do\n\n```python\nimport numpy as np\nimport quadpy\n\n\ndef f(x):\n    return np.sin(x) - x\n\n\nval, err = quadpy.quad(f, 0.0, 6.0)\n```\n\nThis is like\n[scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.quad.html)\nwith the addition that quadpy handles complex-, vector-, matrix-valued integrands,\nand \"intervals\" in spaces of arbitrary dimension.\n\nTo integrate over a _triangle_, do\n\n```python\nimport numpy as np\nimport quadpy\n\n\ndef f(x):\n    return np.sin(x[0]) * np.sin(x[1])\n\n\ntriangle = np.array([[0.0, 0.0], [1.0, 0.0], [0.7, 0.5]])\n\n# get a \"good\" scheme of degree 10\nscheme = quadpy.t2.get_good_scheme(10)\nval = scheme.integrate(f, triangle)\n```\n\nMost domains have `get_good_scheme(degree)`. If you would like to use a particular\nscheme, you can pick one from the dictionary `quadpy.t2.schemes`.\n\nAll schemes have\n\n<!--pytest-codeblocks:skip-->\n\n```python\nscheme.points\nscheme.weights\nscheme.degree\nscheme.source\nscheme.test_tolerance\n\nscheme.show()\nscheme.integrate(\n    # ...\n)\n```\n\nand many have\n\n<!--pytest-codeblocks:skip-->\n\n```python\nscheme.points_symbolic\nscheme.weights_symbolic\n```\n\nquadpy is fully vectorized, so if you like to compute the integral of a function on many\ndomains at once, you can provide them all in one `integrate()` call, e.g.,\n\n<!--pytest-codeblocks:skip-->\n\n```python\n# shape (3, 5, 2), i.e., (corners, num_triangles, xy_coords)\ntriangles = np.stack(\n    [\n        [[0.0, 0.0], [1.0, 0.0], [0.0, 1.0]],\n        [[1.2, 0.6], [1.3, 0.7], [1.4, 0.8]],\n        [[26.0, 31.0], [24.0, 27.0], [33.0, 28]],\n        [[0.1, 0.3], [0.4, 0.4], [0.7, 0.1]],\n        [[8.6, 6.0], [9.4, 5.6], [7.5, 7.4]],\n    ],\n    axis=-2,\n)\n```\n\nThe same goes for functions with vectorized output, e.g.,\n\n```python\ndef f(x):\n    return [np.sin(x[0]), np.sin(x[1])]\n```\n\nMore examples under [test/examples_test.py](test/examples_test.py).\n\nRead more about the dimensionality of the input/output arrays [in the\nwiki](https://github.com/sigma-py/quadpy/wiki#dimensionality-of-input-and-output-arrays).\n\nAdvanced topics:\n\n- [Adaptive quadrature](https://github.com/sigma-py/quadpy/wiki/Adaptive-quadrature)\n- [Creating your own Gauss scheme](https://github.com/sigma-py/quadpy/wiki/Creating-your-own-Gauss-quadrature-in-two-simple-steps)\n- [tanh-sinh quadrature](https://github.com/sigma-py/tanh_sinh/)\n\n## Schemes\n\n### Line segment (_C<sub>1</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/line-segment-gauss-legendre-20.svg\" width=\"50%\">\n\n- [Chebyshev-Gauss](src/quadpy/c1/_chebyshev_gauss.py) (type 1 and 2, arbitrary degree)\n- [Clenshaw-Curtis](src/quadpy/c1/_clenshaw_curtis.py) (arbitrary degree)\n- [Fej\u00e9r](src/quadpy/c1/_fejer.py) (type 1 and 2, arbitrary degree)\n- [Gauss-Jacobi](src/quadpy/c1/_gauss_jacobi.py) (arbitrary degree)\n- [Gauss-Legendre](src/quadpy/c1/_gauss_legendre.py) (arbitrary degree)\n- [Gauss-Lobatto](src/quadpy/c1/_gauss_lobatto.py) (arbitrary degree)\n- [Gauss-Kronrod](src/quadpy/c1/_gauss_kronrod.py) (arbitrary degree)\n- [Gauss-Patterson](src/quadpy/c1/_gauss_patterson.py) (9 nested schemes up to degree 767)\n- [Gauss-Radau](src/quadpy/c1/_gauss_radau.py) (arbitrary degree)\n- [Newton-Cotes](src/quadpy/c1/_newton_cotes.py) (open and closed, arbitrary degree)\n\n[See\nhere](https://github.com/sigma-py/quadpy/wiki/Creating-your-own-Gauss-quadrature-in-two-simple-steps)\nfor how to generate Gauss formulas for your own weight functions.\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.c1.gauss_patterson(5)\nscheme.show()\nval = scheme.integrate(lambda x: np.exp(x), [0.0, 1.0])\n```\n\n### 1D half-space with weight function exp(-r) (_E<sub>1</sub><sup>r</sup>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/e1r-gauss-laguerre-3.svg\" width=\"50%\">\n\n- [Generalized Gauss-Laguerre](src/quadpy/e1r/_gauss_laguerre.py)\n\nExample:\n\n```python\nimport quadpy\n\nscheme = quadpy.e1r.gauss_laguerre(5, alpha=0)\nscheme.show()\nval = scheme.integrate(lambda x: x ** 2)\n```\n\n### 1D space with weight function exp(-r<sup>2</sup>) (_E<sub>1</sub><sup>r<sup>2</sup></sup>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/e1r2-gauss-hermite-8.svg\" width=\"50%\">\n\n- [Gauss-Hermite](src/quadpy/e1r2/_gauss_hermite.py) (arbitrary degree)\n- [Genz-Keister](src/quadpy/e1r2/_genz_keister.py) (1996, 8 nested schemes up to degree 67)\n\nExample:\n\n```python\nimport quadpy\n\nscheme = quadpy.e1r2.gauss_hermite(5)\nscheme.show()\nval = scheme.integrate(lambda x: x ** 2)\n```\n\n### Circle (_U<sub>2</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/circle-krylov-30.svg\" width=\"25%\">\n\n- [Krylov](src/quadpy/u2/_krylov.py) (1959, arbitrary degree)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.u2.get_good_scheme(7)\nscheme.show()\nval = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0], 1.0)\n```\n\n### Triangle (_T<sub>2</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/triangle-dunavant-15.svg\" width=\"25%\">\n\nApart from the classical centroid, vertex, and seven-point schemes we have\n\n- [Hammer-Marlowe-Stroud](src/quadpy/t2/_hammer_marlowe_stroud.py) (1956, 5 schemes up to\n  degree 5)\n- [Albrecht-Collatz](src/quadpy/t2/_albrecht_collatz.py) (1958, degree 3)\n- [Stroud](src/quadpy/t2/_stroud.py) (1971, conical product scheme of degree 7)\n- [Franke](src/quadpy/t2/_franke.py) (1971, 2 schemes of degree 7)\n- [Strang-Fix/Cowper](src/quadpy/t2/_strang_fix_cowper) (1973, 10 schemes up to degree\n  7),\n- [Lyness-Jespersen](src/quadpy/t2/_lyness_jespersen.py) (1975, 21 schemes up to degree 11,\n  two of which are used in [TRIEX](https://doi.org/10.1145/356068.356070)),\n- [Lether](src/quadpy/t2/_lether.py) (1976, degree 2n-2, arbitrary n, not symmetric),\n- [Hillion](src/quadpy/t2/_hillion.py) (1977, 10 schemes up to degree 3),\n- [Laursen-Gellert](src/quadpy/t2/_laursen_gellert) (1978, 17 schemes up to degree 10),\n- [CUBTRI](src/quadpy/t2/_cubtri) (Laurie, 1982, degree 8),\n- [Dunavant](src/quadpy/t2/_dunavant) (1985, 20 schemes up to degree 20),\n- [Cools-Haegemans](src/quadpy/t2/_cools_haegemans) (1987, degrees 8 and 11),\n- [Gatermann](src/quadpy/t2/_gatermann) (1988, degree 7)\n- [Berntsen-Espelid](src/quadpy/t2/_berntsen_espelid) (1990, 4 schemes of degree 13, the\n  first one being [DCUTRI](https://doi.org/10.1145/131766.131772)),\n- [Liu-Vinokur](src/quadpy/t2/_liu_vinokur.py) (1998, 13 schemes up to degree 5),\n- [Griener-Schmid](src/quadpy/t2/_griener_schmid), (1999, 2 schemes of degree 6),\n- [Walkington](src/quadpy/t2/_walkington.py) (2000, 5 schemes up to degree 5),\n- [Wandzura-Xiao](src/quadpy/t2/_wandzura_xiao) (2003, 6 schemes up to degree 30),\n- [Taylor-Wingate-Bos](src/quadpy/t2/_taylor_wingate_bos) (2005, 5 schemes up to degree\n  14),\n- [Zhang-Cui-Liu](src/quadpy/t2/_zhang_cui_liu) (2009, 3 schemes up to degree 20),\n- [Xiao-Gimbutas](src/quadpy/t2/_xiao_gimbutas) (2010, 50 schemes up to degree 50),\n- [Vioreanu-Rokhlin](src/quadpy/t2/_vioreanu_rokhlin) (2014, 20 schemes up to degree 62),\n- [Williams-Shunn-Jameson](src/quadpy/t2/_williams_shunn_jameson) (2014, 8 schemes up to\n  degree 12),\n- [Witherden-Vincent](src/quadpy/t2/_witherden_vincent) (2015, 19 schemes up to degree 20),\n- [Papanicolopulos](src/quadpy/t2/_papanicolopulos) (2016, 27 schemes up to degree 25),\n- [all schemes for the n-simplex](#n-simplex-tn).\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.t2.get_good_scheme(12)\nscheme.show()\nval = scheme.integrate(lambda x: np.exp(x[0]), [[0.0, 0.0], [1.0, 0.0], [0.5, 0.7]])\n```\n\n### Disk (_S<sub>2</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/disk-hammer-stroud-20.svg\" width=\"25%\">\n\n- [Radon](src/quadpy/s2/_radon.py) (1948, degree 5)\n- [Peirce](src/quadpy/s2/_peirce_1956.py) (1956, 3 schemes up to degree 11)\n- [Peirce](src/quadpy/s2/_peirce_1957.py) (1957, arbitrary degree)\n- [Albrecht-Collatz](src/quadpy/s2/_albrecht_collatz.py) (1958, degree 3)\n- [Hammer-Stroud](src/quadpy/s2/_hammer_stroud.py) (1958, 8 schemes up to degree 15)\n- [Albrecht](src/quadpy/s2/_albrecht.py) (1960, 8 schemes up to degree 17)\n- [Mysovskih](src/quadpy/s2/_mysovskih.py) (1964, 3 schemes up to degree 15)\n- [Rabinowitz-Richter](src/quadpy/s2/_rabinowitz_richter) (1969, 6 schemes up to degree 15)\n- [Lether](src/quadpy/s2/_lether.py) (1971, arbitrary degree)\n- [Piessens-Haegemans](src/quadpy/s2/_piessens_haegemans/) (1975, 1 scheme of degree 9)\n- [Haegemans-Piessens](src/quadpy/s2/_haegemans_piessens/) (1977, degree 9)\n- [Cools-Haegemans](src/quadpy/s2/_cools_haegemans/) (1985, 4 schemes up to degree 13)\n- [Wissmann-Becker](src/quadpy/s2/_wissmann_becker.py) (1986, 3 schemes up to degree 8)\n- [Kim-Song](src/quadpy/s2/_kim_song/) (1997, 15 schemes up to degree 17)\n- [Cools-Kim](src/quadpy/s2/_cools_kim/) (2000, 3 schemes up to degree 21)\n- [Luo-Meng](src/quadpy/s2/_luo_meng/) (2007, 6 schemes up to degree 17)\n- [all schemes from the n-ball](#n-ball-sn)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.s2.get_good_scheme(6)\nscheme.show()\nval = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0], 1.0)\n```\n\n### Quadrilateral (_C<sub>2</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/quad-maxwell.svg\" width=\"25%\">\n\n- [Maxwell](src/quadpy/c2/_maxwell.py) (1890, degree 7)\n- [Burnside](src/quadpy/c2/_burnside.py) (1908, degree 5)\n- [Irwin](src/quadpy/c2/_irwin.py) (1923, 3 schemes up to degree 5)\n- [Tyler](src/quadpy/c2/_tyler.py) (1953, 3 schemes up to degree 7)\n- [Hammer-Stroud](src/quadpy/c2/_hammer_stroud.py) (1958, 3 schemes up to degree 7)\n- [Albrecht-Collatz](src/quadpy/c2/_albrecht_collatz.py) (1958, 4 schemes up to degree 5)\n- [Miller](src/quadpy/c2/_miller.py) (1960, degree 1, degree 11 for harmonic integrands)\n- [Meister](src/quadpy/c2/_meister.py) (1966, degree 7)\n- [Phillips](src/quadpy/c2/_phillips.py) (1967, degree 7)\n- [Rabinowitz-Richter](src/quadpy/c2/_rabinowitz_richter) (1969, 6 schemes up to degree 15)\n- [Franke](src/quadpy/c2/_franke.py) (1971, 10 schemes up to degree 9)\n- [Piessens-Haegemans](src/quadpy/c2/_piessens_haegemans) (1975, 2 schemes of degree 9)\n- [Haegemans-Piessens](src/quadpy/c2/_haegemans_piessens) (1977, degree 7)\n- [Schmid](src/quadpy/c2/_schmid) (1978, 3 schemes up to degree 6)\n- [Cools-Haegemans](src/quadpy/c2/_cools_haegemans_1985/) (1985, 6 schemes up to degree 17)\n- [Dunavant](src/quadpy/c2/_dunavant) (1985, 11 schemes up to degree 19)\n- [Morrow-Patterson](src/quadpy/c2/_morrow_patterson) (1985, 2 schemes up to degree 20, single precision)\n- [Cohen-Gismalla](src/quadpy/c2/_cohen_gismalla.py), (1986, 2 schemes up to degree 3)\n- [Wissmann-Becker](src/quadpy/c2/_wissmann_becker) (1986, 6 schemes up to degree 8)\n- [Cools-Haegemans](src/quadpy/c2/_cools_haegemans_1988) (1988, 2 schemes up to degree 13)\n- [Waldron](src/quadpy/c2/_waldron.py) (1994, infinitely many schemes of degree 3)\n- [Sommariva](src/quadpy/c2/_sommariva) (2012, 55 schemes up to degree 55)\n- [Witherden-Vincent](src/quadpy/c2/_witherden_vincent) (2015, 11 schemes up to degree 21)\n- products of line segment schemes\n- [all schemes from the n-cube](#n-cube-cn)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.c2.get_good_scheme(7)\nval = scheme.integrate(\n    lambda x: np.exp(x[0]),\n    [[[0.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [1.0, 1.0]]],\n)\n```\n\nThe points are specified in an array of shape (2, 2, ...) such that `arr[0][0]`\nis the lower left corner, `arr[1][1]` the upper right. If your c2\nhas its sides aligned with the coordinate axes, you can use the convenience\nfunction\n\n<!--pytest-codeblocks:skip-->\n\n```python\nquadpy.c2.rectangle_points([x0, x1], [y0, y1])\n```\n\nto generate the array.\n\n### 2D space with weight function exp(-r) (_E<sub>2</sub><sup>r</sup>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/e2r-rabinowitz-richter-5.svg\" width=\"25%\">\n\n- [Stroud-Secrest](src/quadpy/e2r/_stroud_secrest.py) (1963, 2 schemes up to degree 7)\n- [Rabinowitz-Richter](src/quadpy/e2r/_rabinowitz_richter) (1969, 4 schemes up to degree 15)\n- [Stroud](src/quadpy/e2r/_stroud.py) (1971, degree 4)\n- [Haegemans-Piessens](src/quadpy/e2r/_haegemans_piessens/) (1977, 2 schemes up to degree 9)\n- [Cools-Haegemans](src/quadpy/e2r/_cools_haegemans/) (1985, 3 schemes up to degree 13)\n- [all schemes from the nD space with weight function exp(-r)](#nd-space-with-weight-function-exp-r-enr)\n\nExample:\n\n```python\nimport quadpy\n\nscheme = quadpy.e2r.get_good_scheme(5)\nscheme.show()\nval = scheme.integrate(lambda x: x[0] ** 2)\n```\n\n### 2D space with weight function exp(-r<sup>2</sup>) (_E<sub>2</sub><sup>r<sup>2</sup></sup>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/e2r2-rabinowitz-richter-3.svg\" width=\"25%\">\n\n- [Stroud-Secrest](src/quadpy/e2r2/_stroud_secrest.py) (1963, 2 schemes up to degree 7)\n- [Rabinowitz-Richter](src/quadpy/e2r2/_rabinowitz_richter/) (1969, 5 schemes up to degree 15)\n- [Stroud](src/quadpy/e2r2/_stroud.py) (1971, 3 schemes up to degree 7)\n- [Haegemans-Piessens](src/quadpy/e2r2/_haegemans_piessens/) (1977, 2 schemes of degree 9)\n- [Cools-Haegemans](src/quadpy/e2r2/_cools_haegemans/) (1985, 3 schemes up to degree 13)\n- [all schemes from the nD space with weight function exp(-r<sup>2</sup>)](#nd-space-with-weight-function-exp-r2-enr2)\n\nExample:\n\n```python\nimport quadpy\n\nscheme = quadpy.e2r2.get_good_scheme(3)\nscheme.show()\nval = scheme.integrate(lambda x: x[0] ** 2)\n```\n\n### Sphere (_U<sub>3</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/sphere.png\" width=\"25%\">\n\n- [Albrecht-Collatz](src/quadpy/u3/_albrecht_collatz.py) (1958, 5 schemes up to degree 7)\n- [McLaren](src/quadpy/u3/_mclaren.py) (1963, 10 schemes up to degree 14)\n- [Lebedev](src/quadpy/u3/_lebedev/) (1976, 34 schemes up to degree 131)\n- [Ba\u017eant-Oh](src/quadpy/u3/_bazant_oh/) (1986, 3 schemes up to degree 13)\n- [Heo-Xu](src/quadpy/u3/_heo_xu/) (2001, 27 schemes up to degree 39)\n- [Fliege-Maier](src/quadpy/u3/_fliege_maier/) (2007, 4 schemes up to degree 4,\n  single-precision)\n- [all schemes from the n-sphere](#n-sphere-un)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.u3.get_good_scheme(19)\n# scheme.show()\nval = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0, 0.0], 1.0)\n```\n\nIntegration on the sphere can also be done for functions defined in spherical\ncoordinates:\n\n```python\nimport numpy as np\nimport quadpy\n\n\ndef f(theta_phi):\n    theta, phi = theta_phi\n    return np.sin(phi) ** 2 * np.sin(theta)\n\n\nscheme = quadpy.u3.get_good_scheme(19)\nval = scheme.integrate_spherical(f)\n```\n\n### Ball (_S<sub>3</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/ball.png\" width=\"25%\">\n\n- [Ditkin](src/quadpy/s3/_ditkin.py) (1948, 3 schemes up to degree 7)\n- [Hammer-Stroud](src/quadpy/s3/_hammer_stroud.py) (1958, 6 schemes up to degree 7)\n- [Mysovskih](src/quadpy/s3/_mysovskih.py) (1964, degree 7)\n- [Stroud](src/quadpy/s3/_stroud.py) (1971, 2 schemes up to degree 14)\n- [all schemes from the n-ball](#n-ball-sn)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.s3.get_good_scheme(4)\n# scheme.show()\nval = scheme.integrate(lambda x: np.exp(x[0]), [0.0, 0.0, 0.0], 1.0)\n```\n\n### Tetrahedron (_T<sub>3</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/tet.png\" width=\"25%\">\n\n- [Hammer-Marlowe-Stroud](src/quadpy/t3/_hammer_marlowe_stroud.py)\n  (1956, 3 schemes up to degree 3, also appearing in [Hammer-Stroud](https://doi.org/10.1090/S0025-5718-1958-0102176-6))\n- [Stroud](src/quadpy/t3/_stroud.py) (1971, degree 7)\n- [Yu](src/quadpy/t3/_yu) (1984, 5 schemes up to degree 6)\n- [Keast](src/quadpy/t3/_keast) (1986, 10 schemes up to degree 8)\n- [Beckers-Haegemans](src/quadpy/t3/_beckers_haegemans) (1990, degrees 8 and 9)\n- [Gatermann](src/quadpy/t3/_gatermann) (1992, degree 5)\n- [Liu-Vinokur](src/quadpy/t3/_liu_vinokur.py) (1998, 14 schemes up to degree 5)\n- [Walkington](src/quadpy/t3/_walkington/) (2000, 6 schemes up to degree 7)\n- [Zhang-Cui-Liu](src/quadpy/t3/_zhang_cui_liu/) (2009, 2 schemes up to degree 14)\n- [Xiao-Gimbutas](src/quadpy/t3/_xiao_gimbutas/) (2010, 15 schemes up to degree 15)\n- [Shunn-Ham](src/quadpy/t3/_shunn_ham/) (2012, 6 schemes up to degree 7)\n- [Vioreanu-Rokhlin](src/quadpy/t3/_vioreanu_rokhlin/) (2014, 10 schemes up to degree 13)\n- [Williams-Shunn-Jameson](src/quadpy/t3/_williams_shunn_jameson/) (2014, 1 scheme with\n  degree 9)\n- [Witherden-Vincent](src/quadpy/t3/_witherden_vincent/) (2015, 9 schemes up to degree 10)\n- [Ja\u015bkowiec-Sukumar](src/quadpy/t3/_jaskowiec_sukumar/) (2020, 21 schemes up to degree 20)\n- [all schemes for the n-simplex](#n-simplex-tn).\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.t3.get_good_scheme(5)\n# scheme.show()\nval = scheme.integrate(\n    lambda x: np.exp(x[0]),\n    [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.5, 0.7, 0.0], [0.3, 0.9, 1.0]],\n)\n```\n\n### Hexahedron (_C<sub>3</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/hexa.png\" width=\"25%\">\n\n- [Sadowsky](src/quadpy/c3/_sadowsky.py) (1940, degree 5)\n- [Tyler](src/quadpy/c3/_tyler.py) (1953, 2 schemes up to degree 5)\n- [Hammer-Wymore](src/quadpy/c3/_hammer_wymore.py) (1957, degree 7)\n- [Albrecht-Collatz](src/quadpy/c3/_albrecht_collatz.py) (1958, degree 3)\n- [Hammer-Stroud](src/quadpy/c3/_hammer_stroud.py) (1958, 6 schemes up to degree 7)\n- [Mustard-Lyness-Blatt](src/quadpy/c3/_mustard_lyness_blatt.py) (1963, 6 schemes up to degree 5)\n- [Stroud](src/quadpy/c3/_stroud_1967.py) (1967, degree 5)\n- [Sarma-Stroud](src/quadpy/c3/_sarma_stroud.py) (1969, degree 7)\n- [Witherden-Vincent](src/quadpy/c3/_witherden_vincent/) (2015, 7 schemes up to degree degree 11)\n- [all schemes from the n-cube](#n-cube-cn)\n- Product schemes derived from line segment schemes\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.c3.product(quadpy.c1.newton_cotes_closed(3))\n# scheme.show()\nval = scheme.integrate(\n    lambda x: np.exp(x[0]),\n    quadpy.c3.cube_points([0.0, 1.0], [-0.3, 0.4], [1.0, 2.1]),\n)\n```\n\n### Pyramid (_P<sub>3</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/pyra.png\" width=\"25%\">\n\n- [Felippa](src/quadpy/p3/_felippa.py) (2004, 9 schemes up to degree 5)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.p3.felippa_5()\n\nval = scheme.integrate(\n    lambda x: np.exp(x[0]),\n    [\n        [0.0, 0.0, 0.0],\n        [1.0, 0.0, 0.0],\n        [0.5, 0.7, 0.0],\n        [0.3, 0.9, 0.0],\n        [0.0, 0.1, 1.0],\n    ],\n)\n```\n\n### Wedge (_W<sub>3</sub>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/wedge.png\" width=\"15%\">\n\n- [Felippa](src/quadpy/w3/_felippa.py) (2004, 6 schemes up to degree 6)\n- [Kubatko-Yeager-Maggi](src/quadpy/w3/_kubatko_yeager_maggi.py) (2013, 21 schemes up to\n  degree 9)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\nscheme = quadpy.w3.felippa_3()\nval = scheme.integrate(\n    lambda x: np.exp(x[0]),\n    [\n        [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.5, 0.7, 0.0]],\n        [[0.0, 0.0, 1.0], [1.0, 0.0, 1.0], [0.5, 0.7, 1.0]],\n    ],\n)\n```\n\n### 3D space with weight function exp(-r) (_E<sub>3</sub><sup>r</sup>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/e3r.png\" width=\"25%\">\n\n- [Stroud-Secrest](src/quadpy/e3r/_stroud_secrest.py) (1963, 5 schemes up to degree 7)\n- [all schemes from the nD space with weight function\n  exp(-r)](#nd-space-with-weight-function-exp-r-enr)\n\nExample:\n\n```python\nimport quadpy\n\nscheme = quadpy.e3r.get_good_scheme(5)\n# scheme.show()\nval = scheme.integrate(lambda x: x[0] ** 2)\n```\n\n### 3D space with weight function exp(-r<sup>2</sup>) (_E<sub>3</sub><sup>r<sup>2</sup></sup>_)\n\n<img src=\"https://sigma-py.github.io/quadpy/e3r2.png\" width=\"25%\">\n\n- [Stroud-Secrest](src/quadpy/e3r/_stroud_secrest.py) (1963, 7 schemes up to degree 7)\n- [Stroud](src/quadpy/e3r/_stroud.py) (1971, scheme of degree 14)\n- [all schemes from the nD space with weight function\n  exp(-r<sup>2</sup>)](#nd-space-with-weight-function-exp-r2-enr2)\n\nExample:\n\n```python\nimport quadpy\n\nscheme = quadpy.e3r2.get_good_scheme(6)\n# scheme.show()\nval = scheme.integrate(lambda x: x[0] ** 2)\n```\n\n### n-Simplex (_T<sub>n</sub>_)\n\n- [Lauffer](src/quadpy/tn/_lauffer.py) (1955, 5 schemes up to degree 5)\n- [Hammer-Stroud](src/quadpy/tn/_hammer_stroud.py) (1956, 3 schemes up to degree 3)\n- [Stroud](src/quadpy/tn/_stroud_1964.py) (1964, degree 3)\n- [Stroud](src/quadpy/tn/_stroud_1966.py) (1966, 7 schemes of degree 3)\n- [Stroud](src/quadpy/tn/_stroud_1969.py) (1969, degree 5)\n- [Silvester](src/quadpy/tn/_silvester.py) (1970, arbitrary degree),\n- [Grundmann-M\u00f6ller](src/quadpy/tn/_grundmann_moeller.py) (1978, arbitrary degree)\n- [Walkington](src/quadpy/tn/_walkington.py) (2000, 5 schemes up to degree 7)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\ndim = 4\nscheme = quadpy.tn.grundmann_moeller(dim, 3)\nval = scheme.integrate(\n    lambda x: np.exp(x[0]),\n    np.array(\n        [\n            [0.0, 0.0, 0.0, 0.0],\n            [1.0, 2.0, 0.0, 0.0],\n            [0.0, 1.0, 0.0, 0.0],\n            [0.0, 3.0, 1.0, 0.0],\n            [0.0, 0.0, 4.0, 1.0],\n        ]\n    ),\n)\n```\n\n### n-Sphere (_U<sub>n</sub>_)\n\n- [Stroud](src/quadpy/un/_stroud_1967.py) (1967, degree 7)\n- [Stroud](src/quadpy/un/_stroud_1969.py) (1969, 3 <= n <= 16, degree 11)\n- [Stroud](src/quadpy/un/_stroud.py) (1971, 6 schemes up to degree 5)\n- [Dobrodeev](src/quadpy/un/_dobrodeev_1978.py) (1978, n >= 2, degree 5)\n- [Mysovskikh](src/quadpy/un/_mysovskikh.py) (1980, 2 schemes up to degree 5)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\ndim = 4\nscheme = quadpy.un.dobrodeev_1978(dim)\nval = scheme.integrate(lambda x: np.exp(x[0]), np.zeros(dim), 1.0)\n```\n\n### n-Ball (_S<sub>n</sub>_)\n\n- [Stroud](src/quadpy/sn/_stroud_1957.py) (1957, degree 2)\n- [Hammer-Stroud](src/quadpy/sn/_hammer_stroud.py) (1958, 2 schemes up to degree 5)\n- [Stroud](src/quadpy/sn/_stroud_1966.py) (1966, 4 schemes of degree 5)\n- [Stroud](src/quadpy/sn/_stroud_1967_5.py) (1967, 4 <= n <= 7, 2 schemes of degree 5)\n- [Stroud](src/quadpy/sn/_stroud_1967_7.py) (1967, n >= 3, 3 schemes of degree 7)\n- [Stenger](src/quadpy/sn/_stenger.py) (1967, 6 schemes up to degree 11)\n- [McNamee-Stenger](src/quadpy/sn/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)\n- [Dobrodeev](src/quadpy/sn/_dobrodeev_1970.py) (1970, n >= 3, degree 7)\n- [Dobrodeev](src/quadpy/sn/_dobrodeev_1978.py) (1978, 2 <= n <= 20, degree 5)\n- [Stoyanova](src/quadpy/sn/_stoyanova.py) (1997, n >= 5, degree 7)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\ndim = 4\nscheme = quadpy.sn.dobrodeev_1970(dim)\nval = scheme.integrate(lambda x: np.exp(x[0]), np.zeros(dim), 1.0)\n```\n\n### n-Cube (_C<sub>n</sub>_)\n\n- [Ewing](src/quadpy/cn/_ewing.py) (1941, degree 3)\n- [Tyler](src/quadpy/cn/_tyler.py) (1953, degree 3)\n- [Stroud](src/quadpy/cn/_stroud_1957.py) (1957, 2 schemes up to degree 3)\n- [Hammer-Stroud](src/quadpy/cn/_hammer_stroud.py) (1958, degree 5)\n- [Mustard-Lyness-Blatt](src/quadpy/cn/_mustard_lyness_blatt.py) (1963, degree 5)\n- [Thacher](src/quadpy/cn/_thacher.py) (1964, degree 2)\n- [Stroud](src/quadpy/cn/_stroud_1966.py) (1966, 4 schemes of degree 5)\n- [Phillips](src/quadpy/cn/_phillips.py) (1967, degree 7)\n- [McNamee-Stenger](src/quadpy/cn/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)\n- [Stroud](src/quadpy/cn/_stroud_1968.py) (1968, degree 5)\n- [Dobrodeev](src/quadpy/cn/_dobrodeev_1970.py) (1970, n >= 5, degree 7)\n- [Dobrodeev](src/quadpy/cn/_dobrodeev_1978.py) (1978, n >= 2, degree 5)\n- [Cools-Haegemans](src/quadpy/cn/_cools_haegemans.py) (1994, 2 schemes up to degree 5)\n\nExample:\n\n```python\nimport numpy as np\nimport quadpy\n\ndim = 4\nscheme = quadpy.cn.stroud_cn_3_3(dim)\nval = scheme.integrate(\n    lambda x: np.exp(x[0]),\n    quadpy.cn.ncube_points([0.0, 1.0], [0.1, 0.9], [-1.0, 1.0], [-1.0, -0.5]),\n)\n```\n\n### nD space with weight function exp(-r) (_E<sub>n</sub><sup>r</sup>_)\n\n- [Stroud-Secrest](src/quadpy/enr/_stroud_secrest.py) (1963, 4 schemes up to degree 5)\n- [McNamee-Stenger](src/quadpy/enr/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)\n- [Stroud](src/quadpy/enr/_stroud.py) (1971, 2 schemes up to degree 5)\n\nExample:\n\n```python\nimport quadpy\n\ndim = 4\nscheme = quadpy.enr.stroud_enr_5_4(dim)\nval = scheme.integrate(lambda x: x[0] ** 2)\n```\n\n### nD space with weight function exp(-r<sup>2</sup>) (_E<sub>n</sub><sup>r<sup>2</sup></sup>_)\n\n- [Stroud-Secrest](src/quadpy/enr2/_stroud_secrest.py) (1963, 4 schemes up to degree 5)\n- [McNamee-Stenger](src/quadpy/enr2/_mcnamee_stenger.py) (1967, 6 schemes up to degree 9)\n- [Stroud](src/quadpy/enr2/_stroud_1967_5.py) (1967, 2 schemes of degree 5)\n- [Stroud](src/quadpy/enr2/_stroud_1967_7.py) (1967, 3 schemes of degree 7)\n- [Stenger](src/quadpy/enr2/_stenger.py) (1971, 6 schemes up to degree 11, varying dimensionality restrictions)\n- [Stroud](src/quadpy/enr2/_stroud.py) (1971, 5 schemes up to degree 5)\n- [Phillips](src/quadpy/enr2/_phillips.py) (1980, degree 5)\n- [Cools-Haegemans](src/quadpy/enr2/_cools_haegemans.py) (1994, 3 schemes up to degree 7)\n- [Lu-Darmofal](src/quadpy/enr2/_lu_darmofal.py) (2004, degree 5)\n- [Xiu](src/quadpy/enr2/_xiu.py) (2008, degree 2)\n\nExample:\n\n```python\nimport quadpy\n\ndim = 4\nscheme = quadpy.enr2.stroud_enr2_5_2(dim)\nval = scheme.integrate(lambda x: x[0] ** 2)\n```\n\n### Installation\n\nquadpy is [available from the Python Package Index](https://pypi.org/project/quadpy/), so with\n\n```\npip install quadpy\n```\n\nyou can install.\n\n### Testing\n\nTo run the tests, check out this repository and type\n\n```\nMPLBACKEND=Agg pytest\n```\n\n### License\n\nThis software is published under the [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html).\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Numerical integration, quadrature for various domains",
    "version": "0.16.10",
    "project_urls": {
        "Code": "https://github.com/zfergus/legacy-quadpy",
        "Funding": "https://github.com/sponsors/nschloe",
        "Homepage": "https://github.com/zfergus/legacy-quadpy",
        "Issues": "https://github.com/zfergus/legacy-quadpy/issues"
    },
    "split_keywords": [
        "mathematics",
        "physics",
        "engineering",
        "quadrature",
        "cubature",
        "integration",
        "numerical integration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be57ad2f9240d32adec95c639b66ce77ed5ed0ebb4e16bdfc27846a39d735045",
                "md5": "4cf88b2039b249de9674dc27cb062c42",
                "sha256": "505d153aaa71cc6405c36ef50152c0df7e7227c617d8e501bcee27bdef5dc3a6"
            },
            "downloads": -1,
            "filename": "legacy-quadpy-0.16.10.tar.gz",
            "has_sig": false,
            "md5_digest": "4cf88b2039b249de9674dc27cb062c42",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1140539,
            "upload_time": "2023-12-23T05:29:33",
            "upload_time_iso_8601": "2023-12-23T05:29:33.097848Z",
            "url": "https://files.pythonhosted.org/packages/be/57/ad2f9240d32adec95c639b66ce77ed5ed0ebb4e16bdfc27846a39d735045/legacy-quadpy-0.16.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-23 05:29:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zfergus",
    "github_project": "legacy-quadpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "legacy-quadpy"
}
        
Elapsed time: 0.16617s