It is very likely that you have not initialized elements of coord
, but it is hard to say more without a self-contained example. Cf
julia> Array{Any}(undef, 1)[1]
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] getindex(::Array{Any,1}, ::Int64) at ./array.jl:787
[2] top-level scope at REPL[1]:1