Skip to main content

Cubature

Cubature

Github Actions status:

pytest and coverage

Coverage status:

Codecov Status

What is Cubature?

It is a numerical integration technique. From MathWorld http://mathworld.wolfram.com/Cubature.html, Ueberhuber (1997, p. 71) and Krommer and Ueberhuber (1998, pp. 49 and 155-165) use the word "quadrature" to mean numerical computation of a univariate integral, and "cubature" to mean numerical computation of a multiple integral.

Cubature for Python

This is a wrapper to Prof. Steven Johnson's C package, available at https://github.com/stevengj/cubature. The current version is a wrapper to version 1.0.4 of Prof. Johnson's package.

Documentation

Please, see the module documentation here http://saullocastro.github.io/cubature.

Python wrapper for the Cubature package

From the Nanostructures and Computation Wiki at MIT http://ab-initio.mit.edu/wiki/index.php/Cubature, Steven W. Johnson http://math.mit.edu/~stevenj has written a simple C package for adaptive multidimensional integration (cubature) of vector-valued functions over hypercubes and this is a Python wrapper for the referred C package.

Installation from source code

You must have Cython installed. Then do:

python setup.py install 

or (usually in Linux):

python3 setup.py install

Installation from pip repository

Just do:

python -m pip install cubature

or (usually in Linux):

python3 -m pip install cubature

Running the tests

To run the tests you will have to download the source code. After installing as explained above, go to the source code root folder and run:

py.test .

The Python wrapper has been proven using test integrands from the C package and some additional testing functions from Genz. The integrands were implemented in Cython and verified with Mathematica.

Citing this Python wrapper for Cubature

We kindly ask you to cite this Python library properly. Also, it would be helpful if you could cite the papers where this methods has been applied as well.

Castro, S.G.P.; Loukianov, A.; et al. "Python wrapper for Cubature: adaptive multidimensional integration". DOI:10.5281/zenodo.2541552. Version 0.18.8, 2025.

Citing Papers using this Python wrapper for Cubature

Used to integrate tangent stiffness matrices in computational solid mechanics

Castro, S.G.P. et al. "Evaluation of non-linear buckling loads of geometrically imperfect composite cylinders and cones with the Ritz method". Composite Structures, Vol. 122, 284-299, 2015.

Castro, S.G.P. et al. "A semi-analytical approach for linear and non-linear analysis of unstiffened laminated composite cylinders and cones under axial, torsion and pressure loads". Thin-Walled Structures, Vol. 90, 61-73, 2015.

Examples

Some examples are given in "./examples" https://github.com/saullocastro/cubature/tree/master/examples.

Fork me!

You are welcome to fork this repository and modify it in whatever way you want. It will also be nice if you could send a pull request here in case you think your modifications are valuable for another person.

License

This wrapper follows the GNU-GPL license terms of Steven G. Johnson described in the C Package <https://github.com/saullocastro/cubature/tree/master/cubature/cpackage/COPYING>_.

Metadata

Release files for cubature 0.18.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cubature 0.18.8
File Size Uploaded
cubature-0.18.8.tar.gz 15.3 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for cubature 0.18.8
File
cubature-0.18.8-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
cubature-0.18.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
cubature-0.18.8-cp313-cp313-macosx_10_13_universal2.whl CPython 3.13 CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) Details
cubature-0.18.8-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
cubature-0.18.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
cubature-0.18.8-cp312-cp312-macosx_10_13_universal2.whl CPython 3.12 CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) Details
cubature-0.18.8-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
cubature-0.18.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
cubature-0.18.8-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details
cubature-0.18.8-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
cubature-0.18.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
cubature-0.18.8-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details
cubature-0.18.8-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
cubature-0.18.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
cubature-0.18.8-cp39-cp39-macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) Details
cubature-0.18.8-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
cubature-0.18.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
cubature-0.18.8-cp38-cp38-macosx_11_0_universal2.whl CPython 3.8 CPython 3.8 macOS 11.0+ universal2 (ARM64, x86-64) Details

Total release size: 275.3 MB

Release files / cubature-0.18.8.tar.gz

Download URL cubature-0.18.8.tar.gz
Size 15.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ae27dd47a9384cfe7d9951aab7983594b95d338bf7007d362fa00becd3ff67db
BLAKE2b-256 checksum
How to use checksums
630171ea0a417323f82cf465e332c9e93d7c9648d489d0693192701306a3c325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / cubature-0.18.8-cp313-cp313-win_amd64.whl

Download URL cubature-0.18.8-cp313-cp313-win_amd64.whl
Size 10.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
8c61fa42225ad124348626b99a81286af58fd3a6f039ab0076a9cf64bcb61768
BLAKE2b-256 checksum
How to use checksums
e7eb31151be3386dd7383803b1edd6bebad22a4453e75624301346e87d4f098e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / cubature-0.18.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cubature-0.18.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b1ec8ba5e7d0c68a83873ecb3af9c57a375c4a1df3191ce24944c97204654222
BLAKE2b-256 checksum
How to use checksums
7a235f456ad12b94d22817383d57e20f3c0c6a297b76b3f293551c8d635349ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / cubature-0.18.8-cp313-cp313-macosx_10_13_universal2.whl

Download URL cubature-0.18.8-cp313-cp313-macosx_10_13_universal2.whl
Size 21.2 MB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
d85da8af4616b3c11caecead608efbaac5b139ec047e541a8eb470d79b2a9ef5
BLAKE2b-256 checksum
How to use checksums
920b9e071dfbb7ba97aa22d3bc948ae801e0cbc620642f40cd2e2ece8127d1e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / cubature-0.18.8-cp312-cp312-win_amd64.whl

Download URL cubature-0.18.8-cp312-cp312-win_amd64.whl
Size 10.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c0f1b81b96fa284bf58ace04d01f4143733b7f1ccc40f6b4bd54bbf33af09cbf
BLAKE2b-256 checksum
How to use checksums
25a493d387b44ba5400fde96f3e8e48348ad9c8968f39b973aa08ec968715104
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / cubature-0.18.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cubature-0.18.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
99e1b44bfd0f1decdce6279044b17529a28e762bd5f5c0916b6cf30e44cc9f6a
BLAKE2b-256 checksum
How to use checksums
72175d4b4cd0ef08a7c6dc36128f3b8159aa348175ef1274aaf4a6436dcb7fb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / cubature-0.18.8-cp312-cp312-macosx_10_13_universal2.whl

Download URL cubature-0.18.8-cp312-cp312-macosx_10_13_universal2.whl
Size 21.2 MB
Tags CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2c1e6fbed884e224a676d20ef03a38ae94a689d564b2e0f7df22ebf7984e1634
BLAKE2b-256 checksum
How to use checksums
2b3880fc8b61f35554fab5a6574bd019b8018090d851271c67489475b943d5e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / cubature-0.18.8-cp311-cp311-win_amd64.whl

Download URL cubature-0.18.8-cp311-cp311-win_amd64.whl
Size 10.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
fd1581441eeca729f1ce07b21bea1a30af5107a8816540284fad1fc9b42ac8ee
BLAKE2b-256 checksum
How to use checksums
bdc168cb3299a29d32671feac5b211c04e3c30488bb21f00a1e594d4e8dce97a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / cubature-0.18.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cubature-0.18.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d73eb65d30eb81fbcdc6dd9d6cfcb24975b08efb46ccbebae53694e9c958002e
BLAKE2b-256 checksum
How to use checksums
97e287219c7c3c8a173391159130db540ab6fd6f3fd2aab8bc43b3c43b2ff03a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / cubature-0.18.8-cp311-cp311-macosx_10_9_universal2.whl

Download URL cubature-0.18.8-cp311-cp311-macosx_10_9_universal2.whl
Size 21.2 MB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
fbe3bf7444653d4da6ca07becc28bf45f6b1335b6cc958855d9afdc24fc70d8d
BLAKE2b-256 checksum
How to use checksums
d8ea15b04106483351301351d617273b3d6dc6e475a2bb6b90f3974ed3d77bd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / cubature-0.18.8-cp310-cp310-win_amd64.whl

Download URL cubature-0.18.8-cp310-cp310-win_amd64.whl
Size 10.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
8f82851a3168a6885c87060c40cf1b639c362684f9b61f8035fc354dd9ea59d3
BLAKE2b-256 checksum
How to use checksums
00016fd87843db86a61cc8b85e0c48700e689b896e7f3e22618393b34b5371f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / cubature-0.18.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cubature-0.18.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d90621e8056bb3768e9e3ea34ff12bea4169cca89512b02308798b00f539c055
BLAKE2b-256 checksum
How to use checksums
a10127bced95b680d1c618b48147dfb6eeb20558397a9efa3299f65d343ccd9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / cubature-0.18.8-cp310-cp310-macosx_10_9_universal2.whl

Download URL cubature-0.18.8-cp310-cp310-macosx_10_9_universal2.whl
Size 21.2 MB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
47bb1e91c30b6a7377ad6dfa6c20dcd2d0b057e08390509cbb4aad43fcedd581
BLAKE2b-256 checksum
How to use checksums
d54bf47925e55ab71e1959adf53ca4c6f55a4d62c7c27b13daa555e3485666ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / cubature-0.18.8-cp39-cp39-win_amd64.whl

Download URL cubature-0.18.8-cp39-cp39-win_amd64.whl
Size 10.5 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
479ccbab651c903c63f1c58b926cddf1bedf73b7e63f8e6a3ac80c18654b1a53
BLAKE2b-256 checksum
How to use checksums
5b2d77051854e96bd9760d1c7a56424c385ce1c3724e3f002c3a580e092dbfc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / cubature-0.18.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cubature-0.18.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
77af2ebb6f6e39a7b3c5335ba4d1a0c2306a08772b57c67db03c9413abc1be3b
BLAKE2b-256 checksum
How to use checksums
5647ee774054ca372bb06b2af34974763ab2eafd6f067b9893ed91b4d0544c08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / cubature-0.18.8-cp39-cp39-macosx_10_9_universal2.whl

Download URL cubature-0.18.8-cp39-cp39-macosx_10_9_universal2.whl
Size 21.2 MB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
de8e54afa62dd97570e708bb8114ea0d0dddaa197321618611036f7a7685b60e
BLAKE2b-256 checksum
How to use checksums
b2ff50977626a260b2eeebd0bcad90e271b1d620d08d6115bb3d5799d23dcbdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / cubature-0.18.8-cp38-cp38-win_amd64.whl

Download URL cubature-0.18.8-cp38-cp38-win_amd64.whl
Size 10.5 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
25f1eaae6cc89a7ba095f1e3b112706568e6d70839b51a67858454a42dce7cb4
BLAKE2b-256 checksum
How to use checksums
b476406472ec8f5094300b66513259918725190bdc9f050aa80d370b724b9695
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / cubature-0.18.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cubature-0.18.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c4f59f09e5c1d240320e6bf987c9f142134f7655f6a972650a6321068ad10528
BLAKE2b-256 checksum
How to use checksums
b5855e75f9105b5df521379d37000c2a288a8fc8f7b4e9844d199a90a8db46ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Release files / cubature-0.18.8-cp38-cp38-macosx_11_0_universal2.whl

Download URL cubature-0.18.8-cp38-cp38-macosx_11_0_universal2.whl
Size 21.2 MB
Tags CPython 3.8 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
440f1af72adea0d963c4ea164ea6a26560b74d9a26c6686b1988ceaab9eb713a
BLAKE2b-256 checksum
How to use checksums
59ad3e80bafa975d9c97c034a42d5930f56ebef00999a9511a6bc6838dc6c359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.18.8 This release

19 release files

0.18.5

3 release files

0.18.4

1 release file

0.18.3

1 release file

0.18.1

1 release file

0.14.5

4 release files

0.14.3

4 release files

0.14.2

4 release files

0.14.1

2 release files

0.13.3

2 release files

0.13.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page