unyt
unyt copied to clipboard
compare to Pint / Quantities / perhaps others?
Hey gang! Thanks for making this package - and congrats on getting it out the door :) 👍
Looks like some of this stated to happen in #15, but I just wanted to leave a bookmark to encourage documenting differences, or at least pointing to the existence of other packages performing similar functionality. Pint certainly comes to mind, as does Quantities, but you all are probably more familiar with the state of the other contenders?
As I typed out this issue, I decided to scan the docs and did find that there's documentation for converting between astropy.Units and Pint, which is great! In addition, if it were possible to provide a sentence describing the distinguishing capabilities or differences with these libraries - that'd be sweet.
This isn't unique to your package, so I don't mean to burden you with such a task, just want to express that as a user, it is daunting to figure out which of these packages I should reach for if I want unit capability.
I’m picturing a table in the docs comparing the API for the packages. For example, you could have a row for “convert data in-place to a different unit system” and list convert_to_units
for unyt
, ito
for Pint, and nothing for astropy because it doesn’t support that operation. Would that be a good solution for what you’re looking for?
I’m not familiar with the quantities
, I’ll have to take a look at that.
Thanks, Nathan, a table like that sounds great.
It seems like an additional difference is that unyt
requires numpy arrays, whereas Pint can work with numpy arrays (or at least supports many ufuncs and ndarray methods), but has no dependency on numpy.
That’s right, Pint implements a wrapper class. There’s some discussion about this difference in the JOSS paper as well as in #15.
Any update on this issue? I am currently using Pint in my project and I am curious if some of difficulties I encounter there can be handled differently in unyt.
It’s def worth doing, I haven’t had time to do this. If you have specific questions I can answer in here though.
@ivaniv There's a crowd-sourced comparison table here, it would be good for people to contribute (or make another one on a better site) https://socialcompare.com/en/comparison/python-units-quantities-packages-383avix4