--- id: uncertainties version: "3.2.3" license: Revised BSD License license_treatment: permissive maintenance: active --- # uncertainties — calculations with values with uncertainties, error propagation License: permissive · Maintenance: active · Downloads: 2.6M/mo ## What it is and what it does The uncertainties package lets you perform calculations on numbers that have measurement errors or uncertainties attached to them, automatically computing how those errors propagate through your math. Instead of manually tracking error bars at each step, you work with uncertain values directly—operations like addition, multiplication, and trigonometric functions all handle error propagation transparently. The package correctly accounts for correlations, so expressions like x - x evaluate to exactly zero rather than showing spurious uncertainty. It supports most standard mathematical operations including functions from the math module, comparison operators, and array operations through a NumPy-like interface. You can also extract derivatives of any expression automatically, which the package uses internally for error propagation but exposes for your own use. The package is designed to require minimal changes to existing code—you typically just replace float literals with uncertain values and the rest works as expected. Use it for: - Physics or chemistry experiments: track measurement uncertainties through multi-step calculations and report final results with error bars - Engineering design: propagate component tolerances through system models to predict overall system uncertainty - Data analysis: compute statistics on datasets where each point has an associated measurement error - Educational demonstrations: show students how errors accumulate through calculations without manual error propagation formulas - Calibration and metrology: combine multiple uncertain measurements and track how uncertainty changes through transformations ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Performs arithmetic and mathematical operations on values with uncertainties, automatically propagating errors through calculations and tracking correlations between expressions. Yes. The package is actively maintained, has no dependencies, installs easily, carries no security vulnerabilities, and solves a genuine problem in scientific and engineering workflows. It's production-stable (since 2010) and widely used. Install it if you work with measurements or experimental data where uncertainty quantification matters. ## Install pip install uncertainties uv add uncertainties poetry add uncertainties ## Installing uncertainties Before you install: Low friction installation with no runtime dependencies. Active maintenance status with recent commits and a stable release history since 2010. License in practice: Released under the Revised BSD License (permissive), allowing use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install uncertainties from uncertainties import ufloat x = ufloat(2, 0.25) square = x**2 print(square) # 4.0+/-1.0 print(square.nominal_value, square.std_dev) Verify before relying: - Whether the package supports symbolic uncertainty propagation or only numerical methods - Performance characteristics when working with very large arrays or matrices of uncertain values ## Package facts - License: Revised BSD License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags error propagation calculations, uncertainty quantification, values with error bars, automatic error propagation, uncertainty arithmetic, standard deviation tracking, derivative calculation, scientific-computing, error-analysis, measurement-uncertainty [View on SkillFed](https://skillfed.io/packages/uncertainties) · [View on PyPI](https://pypi.org/project/uncertainties/)