feed.core.operators module¶
-
class
feed.core.operators.Accumulator(func: Callable[[T, T], T], dtype: str = None)[source]¶ Bases:
feed.core.base.StreamAn operator stream that accumulates values of a given stream.
Parameters: - func (Callable[[T,T], T]) – An accumulator function.
- dtype (str) – The data type of accumulated value.
-
forward()[source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
class
feed.core.operators.Apply(func: Callable[[T], K], dtype: str = None)[source]¶ Bases:
feed.core.base.StreamAn operator stream that applies a specific function to the values of a given stream.
Parameters: - func (Callable[[T], …]) – A function to be applied to the values of a stream.
- dtype (str, optional) – The data type of the values after function is applied.
-
class
feed.core.operators.BinOp(op: Callable[[T, T], T], dtype: str = None)[source]¶ Bases:
feed.core.base.StreamA stream operator that combines the values of two given streams into one value of the same type.
Parameters: - op (Callable[[T, T], T]) – The binary operation to be applied.
- dtype (str, optional) – The data type of the stream.
-
forward() → T[source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
generic_name= 'bin_op'¶
-
class
feed.core.operators.Copy[source]¶ Bases:
feed.core.base.StreamA stream operator that copies the values of a given stream.
-
forward() → T[source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
generic_name= 'copy'¶
-
-
class
feed.core.operators.Freeze[source]¶ Bases:
feed.core.base.StreamA stream operator that freezes the value of a given stream and generates that value.
-
forward() → T[source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
generic_name= 'freeze'¶
-
-
class
feed.core.operators.Lag(lag: int = 1, dtype: str = None)[source]¶ Bases:
feed.core.base.StreamAn operator stream that returns the lagged value of a given stream.
Parameters: - lag (int) – The number of steps to lag behind by
- dtype (str, optional) – The data type of the stream
-
forward() → T[source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
generic_name= 'lag'¶