MPArray is an Array API Standard compatible array library that features arbitrary precision arithmetic.
Install with pip:
pip install mparray
Import to access the array namespace:
import mparray as xp
Use any feature defined by the 2025.12 version of the standard:
x = xp.arange(5)
# MPArray([0, 1, 2, 3, 4], dtype=int64)
Integer arrays are filled with Python ints; consequently, elements never overflow.
x = x[:2] + 10**50
# MPArray([100000000000000000000000000000000000000000000000000,
# 100000000000000000000000000000000000000000000000001],
# dtype=int64)
Dtypes follow array API promotion rules for compatibility, but do not limit the underlying representation. For instance, int32 arrays also use Python ints.
xp.astype(x, xp.int32)
# MPArray([100000000000000000000000000000000000000000000000000,
# 100000000000000000000000000000000000000000000000001],
# dtype=int32)
Real and complex floating point arrays are backed by mpmath.
from mpmath import mp
mp.dps = 55 # set the desired precision
y = xp.astype(x, xp.float64)
# MPArray([mpf('100000000000000000000000000000000000000000000000000.0'),
# mpf('100000000000000000000000000000000000000000000000001.0')],
# dtype=float64)
xp.exp(y)
# MPArray([mpf('4.535356657536074105363661926352788592352627616652483210606e+43429448190325182765112891891660508229439700580366'),
# mpf('1.232837758776106335937289338644047193491770865081040599056e+43429448190325182765112891891660508229439700580367')],
# dtype=float64)
Arbitrary-precision equivalents of some SciPy special functions are available:
xp.special.ndtr(-y)
# MPArray([mpf('8.998129248551223738202088675072137970394711995443364311445e-2171472409516259138255644594583025411471985029018332830572230087781144236110599295949020894164292471'),
# mpf('6.461085845597172042837958170074610008600868697345677551181e-2171472409516259138255644594583025411471985029018376260020420755455996799425617236333573042128793971')],
# dtype=float64)
Metadata
Release files for mparray 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mparray-0.2.2.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mparray-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / mparray-0.2.2.tar.gz
| Download URL | mparray-0.2.2.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d17b2f86bebe06e8cbb0b79afc0791de2ba9228043a471b55a403898756eec48
|
|
BLAKE2b-256 checksum How to use checksums |
245b7463e367eaa12f3ef5cbc3d2d84c74af65d7460aed4fd9cd638126118af5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logRelease files / mparray-0.2.2-py3-none-any.whl
| Download URL | mparray-0.2.2-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe4da1e48f8a35cbca0cf16ad2080fbbb557993a9330db454796dd115fb7d273
|
|
BLAKE2b-256 checksum How to use checksums |
2ca2dd110f950c1446eefb6ae90ab5d5bf80f09269193824a4da47273e036152
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency log