-
Notifications
You must be signed in to change notification settings - Fork 475
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
How to best deal with copyto and pint? #553
Comments
Sadly there is no cleaner way to do this. It is not really that we have not supported, but that we cannot do it to the API that numpy exposes (See for example #232 ) |
Too bad. But it's not a deal breaker for me. Pint still works great in most situations! |
You mentioned in #232 that you do not like the idea of subclassing ndarray, but you did not specify why? You also linked to a branch where you tested this out. What were the issues you encountered? |
At the time, we did not find a way to make it cleanly. We wanted:
I am open to look into this again if there is a good proposal |
The
copyto
function complains thatargument must be numpy.ndarray, not Quantity
. I guess that this numpy function is one of the few that is not supported by pint currently. My current approach to work around this is:Are there any cleaner options to use
copyto
with units?The text was updated successfully, but these errors were encountered: