-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
dtype keyword doesn't work as expected for generalized ufuncs #3222
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
Comments
The gufunc for eig/eigvals is somewhat special, as the real versions return complex values (as some eigenvalues may be complex, and in a gufunc we need to know the storage of the result). May it be possible the error is due to that? using a single dtype seems not enough as I guess it forces all the operands to have that type, including the result. In eigvals there is no single implementation that returns something that can be converted to a float64. |
The complicated real->complex type for eigvals explains why On Thu, Apr 11, 2013 at 10:45 AM, Óscar Villellas Guillén <
|
@njsmith And there is that ComplexWarning that makes no sense at all to me. It is likely related... maybe for some reason it is converting complex->double->complex? that would explain the warning and the result, but it would be some really weird behavior. |
This is still broken in 1.9-devel. The scipy version gives
Even the real part of the numpy function look wrong. |
This seems fixed:
So no more warnings, and results match. This part is unchanged
but as @njsmith explained there is no Can be closed I think? |
Agreed with Ralf's comment, the issue is fixed and the rest is correct behaviour. |
With the generalized ufuncs in gh-2954 / gh-3220:
The text was updated successfully, but these errors were encountered: