Skip to content

Cumulative sum on a TSFrame #205

@chiraganand

Description

@chiraganand

cumsum(ts) does not work.

julia> cumsum(ts)
ERROR: MethodError: no method matching +(::TSFrame, ::TSFrame)
Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...) at ~/.julia/juliaup/julia-1.7.3+0.x64.linux.gnu/share/julia/base/operators.jl:655
  +(::ChainRulesCore.AbstractThunk, ::Any) at ~/.julia/packages/ChainRulesCore/RbX5a/src/tangent_arithmetic.jl:122
  +(::ChainRulesCore.Tangent{P}, ::P) where P at ~/.julia/packages/ChainRulesCore/RbX5a/src/tangent_arithmetic.jl:146
  ...
Stacktrace:
  [1] add_sum(x::TSFrame, y::TSFrame)
    @ Base ./reduce.jl:24
  [2] iterate
    @ ./iterators.jl:515 [inlined]
  [3] collect_to!
    @ ./array.jl:782 [inlined]
  [4] collect_to_with_first!
    @ ./array.jl:760 [inlined]
  [5] _collect(c::UnitRange{Int64}, itr::Base.Iterators.Accumulate{typeof(Base.add_sum), TSFrame, Base._InitialValue}, #unused#::Base.EltypeUnknown, isz::Base.HasLength)
    @ Base ./array.jl:754
  [6] collect
    @ ./array.jl:649 [inlined]
  [7] #accumulate#793
    @ ./accumulate.jl:294 [inlined]
  [8] accumulate
    @ ./accumulate.jl:292 [inlined]
  [9] cumsum(itr::TSFrame)
    @ Base ./accumulate.jl:151
 [10] top-level scope
    @ REPL[38]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions