Hi, has the Polynomials.polyfit
command been discontinued or changed?
I recently updated from Julia (JuliaPro) 1.4.2-1 to Julia 1.10.0, and ran a large simulation program in the new version, which crashed with an error on polyfit:
ERROR: UndefVarError: `polyfit` not defined
This DOES work (still) on my old computer running Julia 1.4.2, but crashes on my new computer running Julia 1.10.0.
I believe that the package which this polyfit command is used from was indeed Polynomials.jl, though I was running a number of other packages that it MIGHT have come from instead (e.g., Interpolations, Optim, RollingFunctions, BSplineKit
, etc.). Also, there seems to be a separate “PolyFit
” package as well (which I wasn’t using), which is confusing.
For definiteness, here is a code sample that DOES work in my old installation of Julia 1.4.2, but FAILS in my new installation of Julia 1.10.0:
TryXfit = Array{Float64}(undef, 15)
TryYfit = Array{Float64}(undef, 15)
for NP in 1:15
TryXfit[NP] = NP
TryYfit[NP] = NP+((NP+27)/(NP+3))
end
polyfit(TryXfit, TryYfit, 3)
This ALSO still fails in the same way if I change the last line to:
Polynomials.polyfit(TryXfit, TryYfit, 3)