joshday / OnlineStats.jl

⚡ Single-pass algorithms for statistics
https://joshday.github.io/OnlineStats.jl/latest/
MIT License
831 stars 62 forks source link

Example for IndexedPartition does not work #195

Closed baggepinnen closed 4 years ago

baggepinnen commented 4 years ago

https://joshday.github.io/OnlineStats.jl/stable/api/#OnlineStats.IndexedPartition

julia> o = IndexedPartition(Float64, Hist(10))
IndexedPartition: n=0 | value=Part{OnlineStatsBase.ClosedInterval{Float64},KHist{Float64,Extrema{Float64,Number}}}[]

julia> fit!(o, eachrow(randn(10^4, 2)))
ERROR: The input for IndexedPartition is a Union{Pair{T,S}, NamedTuple{names,Tuple{T,S}}, Tuple{T,S}} where names where S where T.  Found Float64.

The same for Lag

julia> Lag{Int}(10)
ERROR: MethodError: no method matching Lag{Int64}(::Int64)
joshday commented 4 years ago

Thanks! Fixed on master.

baggepinnen commented 4 years ago

I tried the example on both v1.3 and master and it does still not appear to be working. The example is the same in both v1.3 (which is now up) and dev versions of the docs

joshday commented 4 years ago

Oops, fixed for real now