ERROR: InexactError: Int64(NaN) in LsqFit.jl

If you face this issue working with LsqFit.jl it might help to specify the initial values p0 as floating point numbers, instead of Int.
This was wrong in my example:

p0 = [100,  2000,  4000]

This cured the issue:

p0 = [100.0,  2000.0,  4000.0]
1 Like

This was 154 but it’s marked closed. I thought the code was changed to insert float(p0) which will silently fix this, but perhaps not everywhere? Might be worth making an issue.

1 Like