Skip to content

Applying custom functions to rolling #6247

Answered by TomNicholas
rhyswhitley asked this question in Q&A
Discussion options

You must be logged in to vote

HI @rhyswhitley , sorry you found this tricky. If you have any ideas as to how our documentation could be clearer we are all ears!

That said, do you not just need DataArrayRolling.reduce(func)? I.e. da.rolling(window=7).reduce(decayed_sum, k=0.5)

the same operation that would be applied over space and time.

Can you explain a bit more about what you want to do here? You want to use a 1D function to reduce over a 2D rolling window?

Replies: 6 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@rhyswhitley
Comment options

@mathause
Comment options

@TomNicholas
Comment options

@rhyswhitley
Comment options

Answer selected by rhyswhitley
Comment options

You must be logged in to vote
1 reply
@TomNicholas
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@singledoggy
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants