MethodError: no method matching log(::Array{Float64,1})
Closest candidates are:
log(!Matched::Float16) at math.jl:1018
log(!Matched::Complex{Float16}) at math.jl:1019
log(!Matched::Float64) at special/log.jl:254
…
Stacktrace:
[1] top-level scope at In[21]
My question is, It is necessary to use a loop to do it?
Thanks
If you are upgrading old code, upgrade it to earlier Julia versions first so that you will see the deprecation messages. (log(array) was deprecated in Julia 0.6.)
(For example, if you have code that was written for Julia 0.5, first upgrade it to 0.6 and fix the deprecations, then upgrade it to 0.7 and fix the deprecations, then upgrade to 1.0 and 1.1. If you skip versions when upgrading, then you will get error messages instead of deprecation warnings … this is manageable, but requires more knowledge of how to fix things.)