-
Notifications
You must be signed in to change notification settings - Fork 49
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
An error occurs when the exponent is an array #522
Comments
Thanks for reporting this, it's clearly a defect ! |
Thank you for the response. From the perspective of dimensions, |
Hum, maybe I was a bit quick in my previous answer: the only cases where it makes sense to support raising a |
Yes, if the power itself is dimensionless, it should work. See #524 and please let me know if this helps ! |
Description
In the
power
operation of unyt arrays, when the exponent is also an array, it leads to an error.While for numpy arrays, it behaviors like
In [5]: import numpy as np In [6]: a = np.array([1,2,3,4]) In [7]: b = np.array([1,2,3,4]) In [8]: a ** b Out[8]: array([ 1, 4, 27, 256])
I now use
to_ndarray()
to make it work but lose the units.The text was updated successfully, but these errors were encountered: