def normalize_1d_index(index):
 if isinstance(index, types.SliceType):
  return index
 elif isinstance(index, types.Integer):
  return (types.intp if index.signed else types.uintp)

def normalize_1d_index ( index ) : if isinstance ( index , types . SliceType ) : return index elif isinstance ( index , types . Integer ) : return ( types . intp if index . signed else types . uintp )
normalize the *index* type for indexing a 1d sequence .