Skip to content
Snippets Groups Projects
Commit bbc772af authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

getApply refactoresd

parent 1361e460
No related branches found
No related tags found
1 merge request!256Filter funcs
Pipeline #22946 failed with stage
in 1 minute and 54 seconds
......@@ -570,7 +570,7 @@ def getFreqDelta(index):
return delta
def getAttrOrApply(in_obj, apply_obj, attr_access="__name__", attr_or="apply"):
def getApply(in_obj, apply_obj, attr_access="__name__", attr_or="apply"):
"""
For the repeating task of applying build in (accelerated) methods/funcs (`apply_obj`),
of rolling/resampling - like objects (`in_obj`) ,
......@@ -605,11 +605,11 @@ def statPass(
satisfy, `comparator`(`stat`(*sub_chunk*), `sub_thresh`)
"""
stat_parent = datcol.rolling(winsz, min_periods=min_periods)
stat_parent = getAttrOrApply(stat_parent, stat)
stat_parent = getApply(stat_parent, stat)
exceeds = comparator(stat_parent, thresh)
if sub_winsz:
stat_sub = datcol.rolling(sub_winsz)
stat_sub = getAttrOrApply(stat_sub, stat)
stat_sub = getApply(stat_sub, stat)
min_stat = stat_sub.rolling(winsz - sub_winsz, closed="both").min()
exceeding_sub = comparator(min_stat, sub_thresh)
exceeds = exceeding_sub & exceeds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment