Pint 0.6: faster and with better non-multiplicative units support

I have released version 0.6 of Pint, a Python units library.

Pint is Python package to define, operate and manipulate physical quantities: the product of a numerical value and a unit of measurement. It allows arithmetic operations between them and conversions from and to different units.

It provides a comprehensive and extensive list of physical units, prefixes and constants defined in a standalone text file. The registry can parse prefixed and pluralized forms of units resulting in a much shorter and maintainable unit definition list.

It also provides great NumPy integration without monkey patching or importing a particular module, with implicit unit conversion and an emphasis on correctness.

What's new

The largest change landed in the way Pint handles offset units such as temperatures. It now provides a much better behavior that is both correct and useful. It deals properly with differences of temperatures, providing useful error messages when the requested operation is ambiguous.

There were many bug fixes and other internal changes. Thanks to some optimizations and aggressive caching, Pint continues to get faster in each release. We have also improved the quality of some error messages and parts of the code, and the test coverage is above 90%

There a lot of other improvements, you can look at the full list of changes.

Thanks to the people that contributed bug reports, suggestions and patches since 0.5. In particular to Matthieu Dartiailh, Ryan Kingsbury, Joel Mohler, Virgil Dupras, Jonas Olson, John David Reaver and Peter Grayson. A big thanks should be given to David Linke who did an awesome work with offset units (Please let me know if I am forgetting someone!)

Interested? Install it and give it a try!

Submit your bug reports, comments and suggestions in the Issue Tracker. There are already some ideas for version 0.7. Check them out, comment and add yours.

Read the docs: https://pint.readthedocs.org/
or fork the code: https://github.com/hgrecco/pint

Comments

Popular posts from this blog

Communicating with instruments using PyVISA but without NI-VISA

Running Python code in a LaTeX document

PyVISA-sim. Test your PyVISA applications without connected instruments