Skip to content
Snippets Groups Projects

ts_operators suggestions

Merged David Schäfer requested to merge ts_mods into develop
2 unresolved threads

I know, I said if I don't comment the original merge request, I would accept it silently. But here are some suggestions anyhow.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • David Schäfer
    David Schäfer @schaefed started a thread on commit 12694fe7
  • 286 if method == "nagg":
    287 # all values within a grid points range (+/- freq/2, closed to the left) get aggregated with 'agg method'
    288 base = seconds_total / 2
    289 label = 'left'
    290 closed = 'left'
    291 elif method == "bagg":
    292 # all values in a sampling interval get aggregated with agg_method and assigned to the last grid point
    293 base = 0
    294 label = 'left'
    295 closed = 'left'
    296 else:
    297 # all values in a sampling interval get aggregated with agg_method and assigned to the next grid point
    298 base = 0
    299 label = 'right'
    300 closed = 'right'
    293 base, label, closed = methods[method](seconds_total)
  • David Schäfer
    David Schäfer @schaefed started a thread on commit 12694fe7
  • 314 306 try:
    315 # get rid of nan_prefix attached to numpys nanfuncs ("ignore nan is pointless down here -
    316 # resample doesnt pass no nans to the func applied)
    317 if agg_func.__name__[:3] == 'nan':
    318 check_name = agg_func.__name__[3:]
    319 else:
    320 check_name = agg_func.__name__
    321
    322 # another nasty special case: if function "count" was passed, we not want empty intervals to be replaced by nan:
    307 check_name = re.sub("^nan", "", agg_func.__name__)
    308 # a nasty special case: if function "count" was passed, we not want empty intervals to be replaced by nan:
    323 309 if check_name == 'count':
    324 310 empty_intervals[:] = False
    325
    326 311 data = getattr(data_resampler, check_name)()
    327 312 except AttributeError:
    • What attribute access is protected here? agg_func.__name__, getattr(data_resampler, check_name) or both?

    • Both -

      first, if agg_func has no attribute __name__ (what for example is true for partials), there is an attribute error thrown - second, if agg_func has attribute __name__, but there is no corresponding method in the resampler, than also, an attribute error is thrown - and both situations result in the same continuation to just pass the function object to the resampler.apply method

      Edited by Peter Lünenschloß
    • Please register or sign in to reply
  • David Schäfer added 1 commit

    added 1 commit

    • 8cd83d99 - fix sloppy commit: don't overwrite flags in _prepInput

    Compare with previous version

  • @luenensc : What do you think? Merge or not?

  • yes. no problematic changes. So Merge.

  • David Schäfer added 63 commits

    added 63 commits

    Compare with previous version

  • David Schäfer enabled an automatic merge when the pipeline for fe12bfc4 succeeds

    enabled an automatic merge when the pipeline for fe12bfc4 succeeds

  • David Schäfer mentioned in commit a53913c5

    mentioned in commit a53913c5

  • Please register or sign in to reply
    Loading