def _translate_int(exp, length):
    """ Given an integer index, return a 3-tuple
        (start, count, step)
        for hyperslab selection
    """
    if exp < 0:
        exp = length + exp
    if not 0 <= exp < length:
        raise ValueError('Index (%s) out of range (0-%s)' % (exp, length - 1))
    return exp, 1, 1
