pumpp.sampler.Slicer

class pumpp.sampler.Slicer(*ops)[source]

Slicer can compute the duration of data with time-like fields, and slice down to the common time index.

This class serves as a base for Sampler and Pump, and should not be used directly.

Parameters:ops : one or more Scope (TaskTransformer or FeatureExtractor)
__init__(*ops)[source]

Methods

__init__(*ops)
add(operator) Add an operator to the Slicer
crop(data) Crop a data dictionary down to its common time
data_duration(data) Compute the valid data duration of a dict