astropy.utils.shapes.simplify_basic_index(basic_index, *, shape)[source]

Given a Numpy basic index, return a tuple of integers and slice objects with no default values (None) if possible.

If one of the dimensions has a slice and the step is negative and the stop value of the slice was originally None, the new stop value of the slice may still be set to None.

For more information on valid basic indices, see


A valid Numpy basic index


The shape of the array being indexed