Skip to content

Commit

Permalink
export stats
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySarnoff committed Jun 19, 2023
1 parent 127bb5d commit afcd226
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 8 additions & 1 deletion src/RollingFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ using Base: @kwdef
export rolling, tiling, running,
rollmin, rollmax, rollextrema,
rollsum, rollmean, rollvar, rollstd,
rollcor, rollcov
rollcor, rollcov,
tilemin, tilemax, tileextrema,
tilesum, tilemean, tilevar, tilestd,
tilecor, tilecov,
runmin, runmax, runextrema,
runsum, runmean, runvar, runstd,
runcor, runcov


#=
export rolling, running, tiling
Expand Down
7 changes: 3 additions & 4 deletions test/run/run_stats.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
datavec = collect(1.0f0:5.0f0)
weighting = AnalyticWeights(normalize([1.0f0, 2.0f0, 4.0f0]))
windowsize = 3

@test runmean(windowsize, datavec) == Float32[2.0, 3.0, 4.0]
#=
julia> runmean(windowsize, datavec)
ERROR: MethodError: no method matching running(::typeof(VectorizedStatistics.vmean), ::Int64, ::Vector{Float32}; padding::RollingFunctions.NoPadding, atend::Bool)
=#

expected = [2.0f0, 3.0f0, 4.0f0]
obtained = running(mean, 3, datavec)
Expand Down

0 comments on commit afcd226

Please sign in to comment.