Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom ureg support #149

Open
redhog opened this issue Oct 27, 2022 · 1 comment
Open

Custom ureg support #149

redhog opened this issue Oct 27, 2022 · 1 comment

Comments

@redhog
Copy link

redhog commented Oct 27, 2022

Currently pint.get_application_registry() is used everywhere. PintArray should probably dig out the unit registry from the quantities sent in...

@andrewgsavage
Copy link
Collaborator

As I understand it, that's the correct way to work with pint. Before that was used in pint-pandas there were several issues where people were creating a second unit registry trying to operate between two registeries, which doesn't work.

You also need to be able to know what unit registry is being used ahead a PintType being created as you need to be able to construct from string, eg pd.Series([1, 2, 2, 3], dtype="pint[rpm]")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants