rasa/core/featurizers.py
def slice_state_history(
        states: List[Dict[Text, float]],
        slice_length: int
    ) -> List[Optional[Dict[Text, float]]]:
        """Slices states from the trackers history.

        If the slice is at the array borders, padding will be added to ensure
        the slice length."""

        slice_end = len(states)
        slice_start = max(0, slice_end - slice_length)
        padding = [None] * max(0, slice_length - slice_end)
        # noinspection PyTypeChecker
        state_features = padding + states[slice_start:]
        return state_features
Slices states from the trackers history.

        If the slice is at the array borders, padding will be added to ensure
        the slice length.
Slices states from the trackers history.
If the slice is at the array borders, padding will be added to ensure
the slice length.
Slices states from the trackers history . If the slice is at the array borders padding will be added to ensure the slice length .
def slice_state_history(
        states: List[Dict[Text, float]],
        slice_length: int
    ) -> List[Optional[Dict[Text, float]]]:
        slice_end = len(states)
        slice_start = max(0, slice_end - slice_length)
        padding = [None] * max(0, slice_length - slice_end)
        state_features = padding + states[slice_start:]
        return state_features
def slice_state_history ( states : List [ Dict [ Text , float ] ] , slice_length : int ) -> List [ Optional [ Dict [ Text , float ] ] ] : slice_end = len ( states ) slice_start = max ( 0 , slice_end - slice_length ) padding = [ None ] * max ( 0 , slice_length - slice_end ) state_features = padding + states [ slice_start : ] return state_features
Slices states from the trackers history.
Slices states from the trackers history .
"""Slices states from the trackers history.

        If the slice is at the array borders, padding will be added to ensure
        the slice length.""" # noinspection PyTypeChecker
states
List[Dict[Text, float]]
slice_length
int