pint
pint copied to clipboard
NEP 42 Support : New and extensible DTypes
Numpy is going to introduce custom Dtypes to embed metadata. The scope clearly add units as one of the use case, and dtypes like datetime etc.
Is it already used in pandas and such ? This is something that could be interesting to support.
https://numpy.org/neps/nep-0042-new-dtypes.html#motivation-and-scope
This is different to the pandas extension dtype. Not sure how/if it's used in pandas, couldnt see anything when I searched.
just for reference, there's a experimentation repo for custom dtypes here: https://github.com/seberg/unitdtype/
Thanks for the info @keewis. If we can use a common interface for unit conversion with arrays, that would ease some pint parts.
the user can then choose his library of choice for conversion (pint, unyt, astropy).