-
Notifications
You must be signed in to change notification settings - Fork 146
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
support for complex valued function #364
Comments
Ref #157 |
I believe #157 is talking about complex arguments, not complex valued functions. Complex values functions should be much simpler since I am talking real arguments. |
Support for complex-valued functions with real arguments was added in #583: julia> using ForwardDiff
julia> ForwardDiff.derivative(x->exp(im*x), 1.0)
-0.8414709848078965 + 0.5403023058681398im |
ForwardDiff.gradient etc don't work for complex valued functions of multiple real arguments |
e.g. julia> ForwardDiff.gradient(x->exp(im * x[1]+x[2]), [3.0,2.0])
ERROR: DimensionMismatch: gradient(f, x) expects that f(x) is a real number. Perhaps you meant jacobian(f, x)? |
IIUC, ForwardDiff.jl does not support complex valued function such as
x->exp(im*x)
. Is there any plan to support this? I believe this is possible since AutoGrad.jl seems to support this.The text was updated successfully, but these errors were encountered: