ouster.sdk.util.forward_slicer module

class ForwardSlicer[source]

Bases: object

ForwardSlicer provides slicing methods to slice up a container with step to containers that only support forward slicing

static normalize(key, L)[source]
Return type:

slice

static slice_iter(data_iter, key)[source]

Performs forward slicing on a dataset with step

Parameters: - key: must be a normalized slice key with relation to the used data_iter.

a normalized slice key is one where key.start < key.stop and no non-values

Returns:

an iterator scoped to the input key

Return type:

Iterator

static slice(data_iter, key)[source]

Performs forward slicing on a dataset with step

Parameters: - key: must be a normalized slice key with relation to the used data_iter.

a normalized slice key is one where key.start < key.stop and no non-values

Returns:

a list of items scoped to the input key

Return type:

List