You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to work with the autocor function and am taking a column of a data frame and changing it to a vector. typeof(col) is telling me that it is Vector{Any}. When I pass the argument ACF = StatsBase.autocor(col, (1:18); demean = true)I get the error
ERROR: MethodError: no method matching autocor(::Vector{Any}, ::UnitRange{Int64})
Closest candidates are:
autocor(::AbstractVector{T} where T<:Real, ::AbstractVector{T} where T<:Integer; demean) at ~/.julia/packages/StatsBase/XgjIN/src/signalcorr.jl:194
I am able to run the function after passing the argument col = Float64.(col) Does julia intentionally make you specify type or is this an issue.
The text was updated successfully, but these errors were encountered:
We generally assume that the element types are more specific than Any. It's quite useful since we can then e.g. avoid considering complex numbers in the function. For performance, it's also beneficial if your element type is Float64 instead of Any.
I am trying to work with the
autocor
function and am taking a column of a data frame and changing it to a vector.typeof(col)
is telling me that it is Vector{Any}. When I pass the argumentACF = StatsBase.autocor(col, (1:18); demean = true)
I get the errorI am able to run the function after passing the argument
col = Float64.(col)
Does julia intentionally make you specify type or is this an issue.The text was updated successfully, but these errors were encountered: