MCERP
Real-time latin-hypercube sampling-based Monte Carlo ERror Propagation for Python
Overview
mcerp is a stochastic calculator for Monte Carlo methods that uses
latin-hypercube sampling to perform non-order specific
error propagation (or uncertainty analysis).
With this package you can easily and transparently track the effects
of uncertainty through mathematical calculations. Advanced mathematical
functions, similar to those in the standard math module, and statistical
functions like those in the scipy.stats module, can also be evaluated
directly.
If you are familiar with Excel-based risk analysis programs like @Risk, Crystal Ball, ModelRisk, etc., this package will work wonders for you (and probably even be faster!) and give you more modelling flexibility with the powerful Python language. This package also doesn't cost a penny, compared to those commercial packages which cost thousands of dollars for a single-seat license. Feel free to copy and redistribute this package as much as you desire!
-
Transparent calculations. No or little modification to existing code required.
-
Basic
NumPysupport without modification. (I haven't done extensive testing, so please let me know if you encounter bugs.) -
Advanced mathematical functions supported through the
mcerp.umathsub-module. If you think a function is in there, it probably is. If it isn't, please request it! -
Easy statistical distribution constructors. The location, scale, and shape parameters follow the notation in the respective Wikipedia articles and other relevant web pages.
-
Correlation enforcement and variable sample visualization capabilities.
-
Probability calculations using conventional comparison operators.
-
Advanced Scipy statistical function compatibility with package functions. Depending on your version of Scipy, some functions might not work.
Installation
You have several easy, convenient options to install the mcerp package.
pip
pip install mcerp
To install with plotting support:
pip install mcerp[plot]
To install all optional dependencies:
pip install mcerp[all]
uv
uv add mcerp
uv sync
Or in an existing uv environment:
uv pip install mcerp
git
To install the latest version from git:
pip install --upgrade "git+https://github.com/eggzec/mcerp.git#egg=mcerp"
Requirements
- Python >=3.10
- NumPy : Numeric Python
- SciPy : Scientific Python (the nice distribution constructors require this)
- Matplotlib : Python plotting library (optional)
See Also
- uncertainties : First-order error propagation.
- soerp : Second Order ERror Propagation.
Release files for mcerp 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcerp-1.1.1.tar.gz | 509.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcerp-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 534.3 kB
Release files / mcerp-1.1.1.tar.gz
| Download URL | mcerp-1.1.1.tar.gz |
|---|---|
| Size | 509.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce493fae0429b020754c86bc5f6e8d509fb2063ab1da35059be8c18bceddb90d
|
|
BLAKE2b-256 checksum How to use checksums |
a5d4e8b7adefab879b9e8a1c47b208de6a2a7658d41525b0775c0b41a4c58aca
|
| 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 Aug 19, 2026.
Transparency logRelease files / mcerp-1.1.1-py3-none-any.whl
| Download URL | mcerp-1.1.1-py3-none-any.whl |
|---|---|
| Size | 25.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1c543880cc864ddf6c3c2390b74572d5b426abab8c9c65a9e9307cdeac9201c
|
|
BLAKE2b-256 checksum How to use checksums |
2cb5db908a50b73511c20dd0bc1ae9e3c7cd2f68534028349f9fe40d0ed8f465
|
| 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 Aug 19, 2026.
Transparency log