convert_cube_like_item_to_sequence_items

ndcube.utils.sequence.convert_cube_like_item_to_sequence_items(cube_like_item, common_axis, common_axis_cube_lengths)[source] [edit on github]

Converts an input item to NDCubeSequence.index_as_cube to a list od SequenceSlice objects.

Parameters
  • cube_like_item (int, slice, of tuple of int and/or `slice.) – Item compatible with input to NDCubeSequence.index_as_cube.

  • common_axis (int) – Data axis of NDCubes common to NDCubeSequence

  • common_axis_cube_lengths (np.array) – Length of each cube in sequence along the common axis.

Returns

sequence_items (list of SequenceItem namedtuple.) – The slice/index items for each relevant NDCube within the NDCubeSequence which together represent the original input slice/index item.