Build a new primitive that takes as input an ordered index and a set of intervals and builds a mask with the same length as the index with boolean values indicating whether each value is within any of the given intervals or not.
As this is a very simple primitive, it can be directly put inside the custom.timeseries_preprocessing module.
The behavior should be something along this lines:
Inputs should be called index and intervals and output should be called mask.
All types should be numpy.ndarray, even though the implementation can be made to support any kind of array-like object.
Build a new primitive that takes as input an ordered index and a set of intervals and builds a mask with the same length as the index with boolean values indicating whether each value is within any of the given intervals or not.
As this is a very simple primitive, it can be directly put inside the
custom.timeseries_preprocessing
module.The behavior should be something along this lines:
Inputs should be called
index
andintervals
and output should be calledmask
. All types should benumpy.ndarray
, even though the implementation can be made to support any kind of array-like object.