Linear/Poly Fit on a set of data

@nilshg beat me to it, but another way this can happen is if you build vectors the way I used to build lists in python, eg

my_vec = [] # this is equivalent to Any[]

for thing in things
    push!(my_vec, thing)
end

You can specify the vector type when you assign it, eg Float64[] instead.

2 Likes