Releases: lmfit/uncertainties
3.2.3
3.2.3 2025-April-21
Changes
- Changes how
numpy
is handled as an optional dependency. Previously,
importing anumpy
-dependent function, likecorrelated_values
,
withoutnumpy
installed would result in anImportError
at import
time. Now such a function can be imported but if the user attempts to
execute it, aNotImplementedError
is raised indicating that the
function can't be used becausenumpy
couldn't be imported. - Refactors the implementation for the calculation of the derivatives of
the power function and improves the corresponding testing.
Adds:
- Adds a small benchmarking suite to CI to guard against absolute
performance regressions and accidental breakage of the lazy expansion
algorithm whichs ensures O(N), rather than O(N^2), scaling complexity
for operations involving many numbers with uncertainty. Established
connectivity withcodspeed.io<codspeed.io>
_ to track benchmarking
results. (#274)
Fixes:
- Adds documentation for
ufloat_fromstr
behavior for strings which do
not contain uncertainty. (#287) - Fixes typos in
ufloat_fromstr
docstring examples (#285) - Fixes
readthedocs
configuration so that the build passes (#254) - Fixes all doctests (#281)
- Adjusts
codecov.io
configuration so that minor code coverage changes
will not result in indications that tests are failing. Rather code
coverage reports will be purely informational for code reviewers.
Also fix other minor configuration issues. (#270) - Fixes a bug that resulted in a
ZeroDivisionError
while formatting
very small numbers with uncertainty (#135)
Deprecates:
- Certain
umath
functions andAffineScalarFunc
/UFloat
methods will
be removed in a future release. A deprecation warning has been added
to these functions and methods. The followingumath
functions are
marked as deprecated:ceil
,copysign
,fabs
,factorial
,
floor
,fmod
,frexp
,ldexp
,modf
,trunc
. The following
AffineScalarFunc
/UFloat
methods are marked as deprecated:
__floordiv__
,__mod__
,__abs__
,__trunc__
,__lt__
,
__le__
,__gt__
,__ge__
.
3.2.2
- fix support for Numpy 2.0 (#245). Note:
uncertainties.unumpy
still providesumatrix
based onnumpy.matrix
. Withnumpy.matrix
discouraged,umatrix
is too, and will be dropped in a future release. - fix automated running and reporting of code coverage with tests (#246)
- use
setuptools-scm
for setting version number from git tag (#247)
3.2.1
Fixes for build, deployment, and docs
- Use explicit package list to make sure
unumpy
is included (#232) - Use setuptools-scm to make sure all files are in the source distribution (#235)
- updates to configuration for and links to readthedocs documentation. (#239)
- use double backticks more uniformly in docs. (#240)
- fixes to
README.rst
to allow it to render (needed for PyPI upload) (#243)
3.2.0
3.2.0 2024-June-02
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
- Moved code development to lmfit organization, with 4 maintainers.
- Update documentation.
- Drop future dependency. Uncertainties now has no external dependencies when
not using Numpy integration (Drop official support for Python versions before 3.8 #200). - Drop support for Python versions before 3.8, including Python 2 (Drop official support for Python versions before 3.8 #200)
- remove 1to2 and deprecations (remove 1to2 and depreciations #214)
-
Developer related changes
- Moved from setup.py to pyproject.toml (Transition from setup.py to pyproject.toml #199)
- Move tests to tests folder (Move tests to tests folder #216)
- Update unumpy test to be compatible with numpy 2
- Mark docstrings with backslashes as raw strings in tests (Mark docstrings with backslashes as raw strings #226)
No imp deprecation warning for Python 3.4+
Global customization of the pretty-print and LaTeX formats
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.
Added "p" formatting tag
The new "p" formatting tag forces parentheses around the … ± … part of printed numbers.
Single Python 2+3 code. Universal wheel.
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 #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 9830 using this Git 3.1.4 version.
Partial NumPy 1.17 fix
Starting with NumPy 1.17, numpy.linalg.pinv
has a None __defaults__
attribute, for which the code made no provision. This is fixed.
Fixed regression in correlated_values()
correlated_values() now again accepts variables with a 0 variance. This was broken by version 3.1.