Skip to content

Commit

Permalink
add repeat function that vcat's copies of the same mts
Browse files Browse the repository at this point in the history
  • Loading branch information
rcnlee committed May 30, 2018
1 parent b574792 commit 6abf34d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/MultivariateTimeSeries.jl
Expand Up @@ -427,5 +427,11 @@ function append_stop_token(mts::MTS; T=Float64, colname=:stop)
index = [mts.index[i]+(i-1) for i=1:length(mts.index)]
MTS(data, index)
end
"""
Base.repeat(mts::MTS, N::Int)
Stack mts vertically N times.
"""
Base.repeat(mts::MTS, N::Int) = foldl(vcat, mts for i=1:N)

end # module

0 comments on commit 6abf34d

Please sign in to comment.