{"id":13715074,"url":"https://github.com/sigma-py/quadpy","last_synced_at":"2026-03-17T21:36:38.972Z","repository":{"id":41567059,"uuid":"69865111","full_name":"sigma-py/quadpy","owner":"sigma-py","description":":triangular_ruler: Numerical integration (quadrature, cubature) in Python","archived":false,"fork":false,"pushed_at":"2023-04-04T11:08:40.000Z","size":4512,"stargazers_count":771,"open_issues_count":30,"forks_count":85,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-02-13T20:24:43.257Z","etag":null,"topics":["cubature","engineering","integration","mathematics","quadrature"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigma-py.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-10-03T11:35:39.000Z","updated_at":"2025-02-06T08:29:27.000Z","dependencies_parsed_at":"2023-01-31T19:30:38.569Z","dependency_job_id":"53d6f282-2f3b-4b69-9172-cf8cad49bedd","html_url":"https://github.com/sigma-py/quadpy","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"11fcda2dc9a81ebf73752dfb0e3bcf93e32140c4"},"previous_names":["nschloe/quadpy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fquadpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fquadpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fquadpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-py%2Fquadpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigma-py","download_url":"https://codeload.github.com/sigma-py/quadpy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239909031,"owners_count":19716898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cubature","engineering","integration","mathematics","quadrature"],"created_at":"2024-08-03T00:00:53.668Z","updated_at":"2025-12-12T00:50:14.926Z","avatar_url":"https://github.com/sigma-py.png","language":null,"funding_links":[],"categories":["Other libraries and tools","Numerical integration and quadrature"],"sub_categories":["Mesh tools"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sigma-py/quadpy\"\u003e\u003cimg alt=\"quadpy\" src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/logo/logo-with-text.svg\" width=\"60%\"\u003e\u003c/a\u003e\n  \u003cp align=\"center\"\u003eYour one-stop shop for numerical integration in Python.\u003c/p\u003e\n\u003c/p\u003e\n\n[![PyPi Version](https://img.shields.io/pypi/v/quadpy.svg?style=flat-square)](https://pypi.org/project/quadpy/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/quadpy.svg?style=flat-square)](https://pypi.org/project/quadpy/)\n[![GitHub stars](https://img.shields.io/github/stars/sigma-py/quadpy.svg?style=flat-square\u0026logo=github\u0026label=Stars\u0026logoColor=white)](https://github.com/sigma-py/quadpy)\n[![PyPi downloads](https://img.shields.io/pypi/dm/quadpy.svg?style=flat-square)](https://pypistats.org/packages/quadpy)\n\n[![Discord](https://img.shields.io/static/v1?logo=discord\u0026logoColor=white\u0026label=chat\u0026message=on%20discord\u0026color=7289da\u0026style=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\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\u003csup\u003e2\u003c/sup\u003e)](#1d-space-with-weight-function-exp-r2-e1r2),\n[the 2D space with weight functions exp(-r\u003csup\u003e2\u003c/sup\u003e)](#2d-space-with-weight-function-exp-r2-e2r2),\n[the 3D space with weight functions exp(-r\u003csup\u003e2\u003c/sup\u003e)](#3d-space-with-weight-function-exp-r2-e3r2),\nand\n[the nD space with weight functions exp(-r\u003csup\u003e2\u003c/sup\u003e)](#nd-space-with-weight-function-exp-r2-enr2),\nfor fast integration of real-, complex-, and vector-valued functions.\n\n### Installation\n\nInstall quadpy [from PyPI](https://pypi.org/project/quadpy/) with\n\n```\npip install quadpy\n```\n\nSee [here](https://github.com/sigma-py/) on how to get a license.\n\n### Using quadpy\n\nQuadpy provides integration schemes for many different 1D, 2D, even nD domains.\n\nTo start off easy: If you'd numerically integrate any function over any given\n1D interval, 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\nparticular scheme, you can pick one from the dictionary `quadpy.t2.schemes`.\n\nAll schemes have\n\n\u003c!--pytest.mark.skip--\u003e\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\u003c!--pytest.mark.skip--\u003e\n\n```python\nscheme.points_symbolic\nscheme.weights_symbolic\n```\n\nYou can explore schemes on the command line with, e.g.,\n\n```\nquadpy info s2 rabinowitz_richter_3\n```\n\n```\n\u003cquadrature scheme for S2\u003e\n  name:                 Rabinowitz-Richter 2\n  source:               Perfectly Symmetric Two-Dimensional Integration Formulas with Minimal Numbers of Points\n                        Philip Rabinowitz, Nira Richter\n                        Mathematics of Computation, vol. 23, no. 108, pp. 765-779, 1969\n                        https://doi.org/10.1090/S0025-5718-1969-0258281-4\n  degree:               9\n  num points/weights:   21\n  max/min weight ratio: 7.632e+01\n  test tolerance:       9.417e-15\n  point position:       outside\n  all weights positive: True\n```\n\nAlso try `quadpy show`!\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\u003c!--pytest.mark.skip--\u003e\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\u003csub\u003e1\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/line-segment-gauss-legendre-20.svg\" width=\"50%\"\u003e\n\n- Chebyshev-Gauss (type 1 and 2, arbitrary degree)\n- Clenshaw-Curtis (arbitrary degree)\n- Fejér (type 1 and 2, arbitrary degree)\n- Gauss-Jacobi (arbitrary degree)\n- Gauss-Legendre (arbitrary degree)\n- Gauss-Lobatto (arbitrary degree)\n- Gauss-Kronrod (arbitrary degree)\n- Gauss-Patterson (9 nested schemes up to degree 767)\n- Gauss-Radau (arbitrary degree)\n- Newton-Cotes (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\u003csub\u003e1\u003c/sub\u003e\u003csup\u003er\u003c/sup\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/e1r-gauss-laguerre-3.svg\" width=\"50%\"\u003e\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\u003csup\u003e2\u003c/sup\u003e) (_E\u003csub\u003e1\u003c/sub\u003e\u003csup\u003er\u003csup\u003e2\u003c/sup\u003e\u003c/sup\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/e1r2-gauss-hermite-8.svg\" width=\"50%\"\u003e\n\n- Gauss-Hermite (arbitrary degree)\n- Genz-Keister (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\u003csub\u003e2\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/circle-krylov-30.svg\" width=\"25%\"\u003e\n\n- Krylov (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\u003csub\u003e2\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/triangle-dunavant-15.svg\" width=\"25%\"\u003e\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\u003csub\u003e2\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/disk-hammer-stroud-20.svg\" width=\"25%\"\u003e\n\n- Radon (1948, degree 5)\n- Peirce (1956, 3 schemes up to degree 11)\n- Peirce (1957, arbitrary degree)\n- Albrecht-Collatz (1958, degree 3)\n- Hammer-Stroud (1958, 8 schemes up to degree 15)\n- Albrecht (1960, 8 schemes up to degree 17)\n- Mysovskih (1964, 3 schemes up to degree 15)\n- Rabinowitz-Richter (1969, 6 schemes up to degree 15)\n- Lether (1971, arbitrary degree)\n- Piessens-Haegemans (1975, 1 scheme of degree 9)\n- Haegemans-Piessens (1977, degree 9)\n- Cools-Haegemans (1985, 4 schemes up to degree 13)\n- Wissmann-Becker (1986, 3 schemes up to degree 8)\n- Kim-Song (1997, 15 schemes up to degree 17)\n- Cools-Kim (2000, 3 schemes up to degree 21)\n- Luo-Meng (2007, 6 schemes up to degree 17)\n- Takaki-Forbes-Rolland (2022, 19 schemes up to degree 77)\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\u003csub\u003e2\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/quad-maxwell.svg\" width=\"25%\"\u003e\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\u003c!--pytest.mark.skip--\u003e\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\u003csub\u003e2\u003c/sub\u003e\u003csup\u003er\u003c/sup\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/e2r-rabinowitz-richter-5.svg\" width=\"25%\"\u003e\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\u003csup\u003e2\u003c/sup\u003e) (_E\u003csub\u003e2\u003c/sub\u003e\u003csup\u003er\u003csup\u003e2\u003c/sup\u003e\u003c/sup\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/e2r2-rabinowitz-richter-3.svg\" width=\"25%\"\u003e\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- Van Zandt (2019, degree 6)\n- [all schemes from the nD space with weight function exp(-r\u003csup\u003e2\u003c/sup\u003e)](#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\u003csub\u003e3\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/sphere.png\" width=\"25%\"\u003e\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žant-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\u003csub\u003e3\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/ball.png\" width=\"25%\"\u003e\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- Van Zandt (2020, degree 4)\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\u003csub\u003e3\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/tet.png\" width=\"25%\"\u003e\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śkowiec-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\u003csub\u003e3\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/hexa.png\" width=\"25%\"\u003e\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\u003csub\u003e3\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/pyra.png\" width=\"25%\"\u003e\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\u003csub\u003e3\u003c/sub\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/wedge.png\" width=\"15%\"\u003e\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\u003csub\u003e3\u003c/sub\u003e\u003csup\u003er\u003c/sup\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/e3r.png\" width=\"25%\"\u003e\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\u003csup\u003e2\u003c/sup\u003e) (_E\u003csub\u003e3\u003c/sub\u003e\u003csup\u003er\u003csup\u003e2\u003c/sup\u003e\u003c/sup\u003e_)\n\n\u003cimg src=\"https://raw.githubusercontent.com/sigma-py/quadpy/main/plots/e3r2.png\" width=\"25%\"\u003e\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- Van Zandt (2020, degree 4)\n- [all schemes from the nD space with weight function\n  exp(-r\u003csup\u003e2\u003c/sup\u003e)](#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\u003csub\u003en\u003c/sub\u003e_)\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öller](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\u003csub\u003en\u003c/sub\u003e_)\n\n- [Stroud](src/quadpy/un/_stroud_1967.py) (1967, degree 7)\n- [Stroud](src/quadpy/un/_stroud_1969.py) (1969, 3 \u003c= n \u003c= 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 \u003e= 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\u003csub\u003en\u003c/sub\u003e_)\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 \u003c= n \u003c= 7, 2 schemes of degree 5)\n- [Stroud](src/quadpy/sn/_stroud_1967_7.py) (1967, n \u003e= 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 \u003e= 3, degree 7)\n- [Dobrodeev](src/quadpy/sn/_dobrodeev_1978.py) (1978, 2 \u003c= n \u003c= 20, degree 5)\n- [Stoyanova](src/quadpy/sn/_stoyanova.py) (1997, n \u003e= 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\u003csub\u003en\u003c/sub\u003e_)\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 \u003e= 5, degree 7)\n- [Dobrodeev](src/quadpy/cn/_dobrodeev_1978.py) (1978, n \u003e= 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\u003csub\u003en\u003c/sub\u003e\u003csup\u003er\u003c/sup\u003e_)\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\u003csup\u003e2\u003c/sup\u003e) (_E\u003csub\u003en\u003c/sub\u003e\u003csup\u003er\u003csup\u003e2\u003c/sup\u003e\u003c/sup\u003e_)\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigma-py%2Fquadpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigma-py%2Fquadpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigma-py%2Fquadpy/lists"}