Skip to content

Jacobian of in-place functions in presence of undefined references #436

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
lcontento opened this issue Jan 17, 2020 · 0 comments · May be fixed by #743
Open

Jacobian of in-place functions in presence of undefined references #436

lcontento opened this issue Jan 17, 2020 · 0 comments · May be fixed by #743

Comments

@lcontento
Copy link

The method

ForwardDiff.jacobian(f!, y::AbstractArray, x::AbstractArray)

throws UndefRefError when y contains undefined references.
For example,

using ForwardDiff
f!(y, x) = copy!(y, x)
x0 = BigFloat[1.0, 1.0]
ForwardDiff.jacobian(f!, similar(x0), x0)

In particular, this affects the NLsolve package, e.g.,

using NLsolve
nlsolve(f!, x0, autodiff=:forward)

Since I think the reasonable expectation is that only the type and shape of the y array are going to be used in ForwardDiff.jacobian, I am reporting this here. If you do not think that the undefined case should be taken in account, I will post an issue for NLsolve instead.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant