JuliaNLSolvers / NLSolversBase.jl

Base package for optimization and equation solver software in JuliaNLSolvers
Other
30 stars 28 forks source link

Fix non-vector input Jacobian creation #128

Closed ChrisRackauckas closed 4 years ago

mcabbott commented 4 years ago

Why was this changed?

It might be causing https://github.com/JuliaNLSolvers/LsqFit.jl/pull/168, by reading from the other uninitialised arrays to create this one.

julia> z = big.(ones(2));

julia> alloc_DF(similar(z), similar(z))
ERROR: UndefRefError: access to undefined reference
pkofod commented 4 years ago

similar should be avoided with big arrays for this very reason

mcabbott commented 4 years ago

Sorry I don't understand. This PR seems to have introduced an inability to handle uninitialised arrays. If it used similar as before, then it would never call getindex on its input. What's the purpose of making it sensitive to uninitialised contents?