NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2906 most downloaded on PyPI
calculations with values with uncertainties, error propagation
Last release 8 months ago
09 Jan 2026
Release timing varies
gaps range from 1 weeks to 2.0 years
Some releases are documented
notes for 20 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
16 years old
83 releases · first in 2010
The AffineScalarFunc.derivatives property has been marked as deprecated. This property will be removed in a future release.
Adds:
4.0.0 release.pypi whenstd_dev==0 so that it blamesufloat() function.SOURCE_DATE_EPOCH.Deprecates:
AffineScalarFunc.derivatives property has been marked as deprecated. ThisAffineScalarFunc.error_components() method has been marked as deprecated. Thisuncertainties AffineScalarFunc scalar objectsnp.matrix objects is now marked as deprecated. According to thenumpy documentation <https://numpy.org/doc/stable/reference/generated/numpy.matrix.html>_np.matrix class is no longer recommended.One column per quarter.
Certain umath functions and AffineScalarFunc / UFloat methods will be removed in a future release. A deprecation warning has been added to these funct…
Changes
numpy is handled as an optional dependency. Previously,numpy-dependent function, like correlated_values,numpy installed would result in an ImportError at importNotImplementedError is raised indicating that thenumpy couldn't be imported.Adds:
codspeed.io<codspeed.io>_ to track benchmarkingFixes:
ufloat_fromstr behavior for strings which doufloat_fromstr docstring examples (#285)readthedocs configuration so that the build passes (#254)codecov.io configuration so that minor code coverage changesZeroDivisionError while formattingDeprecates:
umath functions and AffineScalarFunc/UFloat methods willumath functions areceil, copysign, fabs, factorial,floor, fmod, frexp, ldexp, modf, trunc. The followingAffineScalarFunc/UFloat methods are marked as deprecated:__floordiv__, __mod__, __abs__, __trunc__, __lt__,__le__, __gt__, __ge__.fix support for Numpy 2.0 ( #245 ). Note: uncertainties.unumpy still provides umatrix based on numpy.matrix . With numpy.matrix discouraged, umatrix i
uncertainties.unumpy still provides umatrix based on numpy.matrix. With numpy.matrix discouraged, umatrix is too, and will be dropped in a future release.setuptools-scm for setting version number from git tag (#247)Fixes for build, deployment, and docs
Fixes for build, deployment, and docs
unumpy is included (#232)README.rst to allow it to render (needed for PyPI upload) (#243)remove 1to2 and deprecations (remove 1to2 and depreciations #214 )
Version 3.2.0 is the first release of Uncertainties in nearly two years and the
first minor release in over five years. It marks the beginning of an effort to
refresh and update the project with a new and expanded team of maintainers.
Main Changes
Developer related changes
See https://github.com/lebigot/uncertainties/issues/145.
See https://github.com/lebigot/uncertainties/issues/145.
The pretty-print and LaTeX formats can now be customized: the symbols used can be changed (a centered dot can thus for instance be used instead of the
The pretty-print and LaTeX formats can now be customized: the symbols used can be changed (a centered dot can thus for instance be used instead of the usual multiplication symbol).
Unit tests were added for this.
More details are in the Sphinx documentation.
The new "p" formatting tag forces parentheses around the … ± … part of printed numbers.
The new "p" formatting tag forces parentheses around the … ± … part of printed numbers.
There is now a single code base for Python 2 and Python 3.
There is now a single code base for Python 2 and Python 3.
Python 2.7 is now the minimal Python version.
The installation can also now be done through a universal wheel, which helps with some external projects (see issue https://github.com/lebigot/uncertainties/issues/106, for instance).
This Git version should have the same uncertainties code as PyPI version 3.1.4, but some accompanying files have been updated. This should have no impact on users. Developers are better off using this Git 3.1.4 version.
Starting with NumPy 1.17, numpy.linalg.pinv has a None __defaults__ attribute, for which the code made no provision. This is fixed.
Starting with NumPy 1.17, numpy.linalg.pinv has a None __defaults__ attribute, for which the code made no provision. This is fixed.
correlated_values() now again accepts variables with a 0 variance. This was broken by version 3.1.
correlated_values() now again accepts variables with a 0 variance. This was broken by version 3.1.
Nothing published for this version
The deprecation warning raised by inspect.getargspec() in recent versions of Python 3 is now gone.
The deprecation warning raised by inspect.getargspec() in recent versions of Python 3 is now gone.
Nothing published for this version
A calculation like str(sum(ufloat(1, 1) for _ in xrange(100000))) is now about 5,000 faster than with the latest release (version 2.4.8.1).
A calculation like str(sum(ufloat(1, 1) for _ in xrange(100000))) is now about 5,000 faster than with the latest release (version 2.4.8.1).
More generally, the calculation time of such sums (and more generally of complex expressions involving many numbers with uncertainty) is now linear instead of quadratic, and much faster in absolute time.
This closes issue https://github.com/lebigot/uncertainties/issues/30.
Nothing published for this version
Nothing published for this version
Nothing published for this version
±inf±… can now be printed and formatted.
±inf±… can now be printed and formatted.
This is consistent with the fact that such numbers with uncertainty can be created with uncertainties.ufloat().
This makes it easier to handle calculation that work with floats despite involving infinities.
Nothing published for this version
"python3 setup.py install" failed when setuptools was not installed. This is now fixed (by running 2to3 in setup.py when setuptools is not available,
"python3 setup.py install" failed when setuptools was not installed. This is now fixed (by running 2to3 in setup.py when setuptools is not available, since distutils does not do it automatically).
The string and empty format type formatting of numbers with uncertainties are now similar to what Python 3.4 does (https://docs.python.org/3.4/library
The string and empty format type formatting of numbers with uncertainties are now similar to what Python 3.4 does (https://docs.python.org/3.4/library/string.html#format-specification-mini-language).
The previous behavior was based on the Python 2.7 documentation, which is probably incorrect (http://stackoverflow.com/questions/16525924/precise-definition-of-float-string-formatting).
Numbers like NaN±… can now be formatted.
Numbers like NaN±… can now be formatted.
Nothing published for this version
An exception is now raised for negative standard deviations. This fixes a regression probably introduced by version 2.
An exception is now raised for negative standard deviations. This fixes a regression probably introduced by version 2.
Workaround for NumPy 1.8.0 new mean() behavior, which made uncertainties fail when calculating the mean of an array with numbers with uncertainties.
Workaround for NumPy 1.8.0 new mean() behavior, which made uncertainties fail when calculating the mean of an array with numbers with uncertainties.
Reference: https://github.com/numpy/numpy/issues/4063
The uncertainties.umath functions ceil(), floor(), isinf(), isnan() and trunc() now return values of the same type as their corresponding function in
The uncertainties.umath functions ceil(), floor(), isinf(), isnan() and trunc() now return values of the same type as their corresponding function in the math module.
In previous versions, they generally returned values with a zero uncertainty (…±0), which was not useful, since the results of these functions are integers (float or int type) or booleans. It is less surprising to obtain the same types as in the math module.
This version adds extensive support for formatting, including automatic and user-defined control of the uncertainty format, and pretty-printing and La
This version adds extensive support for formatting, including automatic and user-defined control of the uncertainty format, and pretty-printing and LaTeX formatting.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →