Skip to main content

Logo

Python Version version DOI Documentation Status license contributions welcome

Scientific computations are surrounded by various forms of uncertainty, requiring appropriate treatment to maximise the credibility of computations. Empirical information is often scarce, vague, conflicting and imprecise, requiring expressive uncertainty structures for trustful representation, aggregation and propagation.

This package is underpinned by a framework of uncertain number which allows for a closed computation ecosystem whereby trustworthy computations can be conducted in a rigorous manner. It provides capabilities across the typical uncertainty analysis pipeline, encompassing characterisation, aggregation, propagation, model updating, and applications including reliability analysis and optimisation under uncertainty, especially with a focus on imprecise probabilities.

Uncertain Number refers to a generalised representation that unifies several uncertainty constructs including real numbers, intervals, probability distributions, interval bounds on probability distributions (i.e. probability boxes), and finite DempsterShafer structures. It is mostly suitable for managing mixed types of uncertainties.

Getting started

Explore the documentation to get started, featuring hands-on tutorials and in-depth examples that showcase the power of the package.

pyuncertainnumber exposes APIs at different levels. It features high-level APIs best suited for new users to quickly start with uncertainty computations with uncertain numbers, and also low-level APIs allowing experts to have additional controls over mathematical constructs such as p-boxes, Dempster Shafer structures, probability distributions, etc.

Installation

PyUncertainNumber can be installed from PyPI. Upon activation of your virtual environment, use the code below in your terminal. For additional instructions, refer to installation guide.

pip install pyuncertainnumber

Capabilities

Logo

  • PyUncertainNumber is a Python package for generic computational tasks focussing on rigorous uncertainty analysis, which provides a research-grade computing environment for uncertainty characterisation, propagation, validation and uncertainty extrapolation.
  • PyUncertainNumber supports probability bounds analysis to rigorously bound the prediction for the quantity of interest with mixed uncertainty propagation.
  • PyUncertainNumber also features great natural language support as such characterisatin of input uncertainty can be intuitively done by using natural language like about 7 or simple expression like [15 +- 10%], without worrying about the elicitation.
  • Interoperability via serialization: features the save and loading of Uncertain Number objects to work with downstream applications.
  • Yields informative results during the computation process such as the combination that leads to the maximum in vertex method.

UQ multiverse

UQ is a big world (like Marvel multiverse) consisting of abundant theories and software implementations on multiple platforms. Some notable examples include OpenCossan UQlab in Matlab and ProbabilityBoundsAnalysis.jl in Julia, and many others of course. We focus mainly on the imprecise probability frameworks. PyUncertainNumber is rooted in Python and has close ties with the Python scientific computing ecosystem, it builds upon and greatly extends a few pioneering projects, such as intervals, scipy-stats and pba-for-python to generalise probability and interval arithmetic. Beyond arithmetic calculations, PyUncertainNumber has offered a wide spectrum of algorithms and methods for uncertainty characterisation, propagation, surrogate modelling, and optimisation under uncertainty, allowing imprecise uncertainty analysis in both intrusive and non-intrusive manner. PyUncertainNumber is under active development and will continue to be dedicated to support imprecise analysis in engineering using Python.

Citation

Yu Chen, Scott Ferson (2025). Imprecise uncertainty management with uncertain numbers to facilitate trustworthy computations., SciPy proceedings 2025.

A downloadable version can be accessed here.

@inproceedings{chen2025scipyproceed,
  title = {Imprecise uncertainty management with uncertain numbers to facilitate trustworthy computations},
  booktitle = {SciPy Proceedings},
  year = {2025},
  author = {Chen, Yu and Ferson, Scott},
  doi = {10.25080/ahrt5264}
}

@software{chen_2025_17235456,
  author       = {Chen, (Leslie) Yu},
  title        = {PyUncertainNumber},
  publisher    = {Zenodo},
  version      = {0.1.1},
  doi          = {10.5281/zenodo.17235456},
  url          = {https://doi.org/10.5281/zenodo.17235456},
}

Metadata

Release files for pyuncertainnumber 0.1.15

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

Source distribution (sdist)

Source distribution for pyuncertainnumber 0.1.15
File Size Uploaded
pyuncertainnumber-0.1.15.tar.gz 202.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyuncertainnumber 0.1.15
File Interpreter ABI Platform
pyuncertainnumber-0.1.15-py3-none-any.whl Python 3 none any Details

Total release size: 425.7 kB

Release files / pyuncertainnumber-0.1.15.tar.gz

Download URL pyuncertainnumber-0.1.15.tar.gz
Size 202.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fa3cc56590c8dbfc13313aafdbf7692963b0cc27c9fa4afbc3f85e330e2fe201
BLAKE2b-256 checksum
How to use checksums
66a920abe593e97c0bd13eb43870148d1e3c04b705997c3cc4d0fc6093161173
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 9, 2026.

Transparency log

Release files / pyuncertainnumber-0.1.15-py3-none-any.whl

Download URL pyuncertainnumber-0.1.15-py3-none-any.whl
Size 223.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2fbd4194671d6ead4e8b178ba5eb0cb17f34bb743758275afb9ef933339c3db
BLAKE2b-256 checksum
How to use checksums
4d1f72db929b78c36fe37a96a497a2212a1548c6fce42c95d44858980473549c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.15 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.20

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.4

2 release files

0.0.3

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