calypso.utils.str_parser module

calypso.utils.str_parser.parse_slice(slice_str)

Convert a slice string into a list of integers representing the slice range, constrained between 1 and 230.

Parameters:

slice_str (str) – A string representing a slice, e.g., ‘1:10:2’, ‘::2’, ‘10:’, etc.

Returns:

A list of integers that represent the range specified by the slice, constrained between 1 and 230.

Return type:

list