-
Notifications
You must be signed in to change notification settings - Fork 473
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
Incorrect answers with numpy ufuncs and the out keyword #644
Comments
Can you check without the out keyword? |
This script: import numpy as np
from pint import UnitRegistry
u = UnitRegistry()
a = [1, 2, 3]*u.g
b = [1, 2, 3]*u.kg
print(np.add(a, b)) prints |
I wonder if when #630 is merged, this issue will be fixed. |
I get the same wrong answer with numpy 1.12.1 installed. |
Just to note it down so it doesn't get forgotten, this issue (along with most other issues with optional arguments in NumPy ufuncs) remains after the refactor in #905. |
This works in |
Consider the following example:
With
Pint 0.8.1
, I get[2. 4. 6.]
as the output of this script, when I would expect either[1001. 1002. 1003.]
,[1.001 1.002 1.003]
or similar with units attached.Pint
returns the correct answer whenout
is not specified.The text was updated successfully, but these errors were encountered: