-
Notifications
You must be signed in to change notification settings - Fork 28
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
Complex-valued gradients broken #117
Comments
Hm, Optim.jl/test/multivariate/complex.jl contains similar codes, that should also fail. @pkofod can you revert? |
We should have had tests like that here. Sorry about that. |
No worries. Thanks for the quick reply! |
If you're looking for a quick fix, you can just specify the input yourself, but if I cannot find a fix, I'll just revert it(see #118) but this should work, right?
|
Yes that workaround works, thanks. |
I didn't intend for that to be required for complex input though, so it's only until I get to fix this. At the very least I can special case it for |
No worries. It's easy to overlook "special" cases such as that. Best lesson to be learned is to really put such stuff into test cases and make sure it never happens. 😄 |
Due to the changes introduced in #112 for fixing #97, real-valued objective functions of complex parameters (thus complex-valued gradients) are broken.
For example:
does not work because of an attempt to copy the complex
x0
into a real-valued array allocated in abstract.jl:21:The text was updated successfully, but these errors were encountered: