awesome-python icon indicating copy to clipboard operation
awesome-python copied to clipboard

add pint

Open norweeg opened this issue 4 years ago • 2 comments

What is this Python project?

Pint allows you to manipulate physical quantities in a unit-aware manner. Is compatible with other libraries such as numpy

What's the difference between this Python project and similar ones?

Comes with a list of physical constants, units, and prefixes Automatically typesets units for display in Jupyter All operations are unit-aware

--

Anyone who agrees with this pull request could submit an Approve review to it.

norweeg avatar Jan 22 '21 15:01 norweeg

There's already fairly advanced astropy.units module for the same purpose. Can you compare your code to it? In what sense is it better?

minzastro avatar Jan 22 '21 15:01 minzastro

There's already fairly advanced astropy.units module for the same purpose. Can you compare your code to it? In what sense is it better?

  • more units. Astropy is astronomy-oriented and the units reflect that. Pint is generic and includes all SI units (e.g. astropy.units does not support units of data, fluid volume, or electrical current, because those kinds of units are not useful for astronomy, but pint does) A full list of supported units supported by pint is here
  • more constants. Again, Astropy is for astronomy and the available constants reflect that. A full list of constants included in pint is available here
  • support for non-metric, non-SI units e.g. the entire imperial system

norweeg avatar Jan 22 '21 16:01 norweeg