def valid_pt(pt, shape):
    """
    Determine if a point (indices) is valid for a given shaped
    """
    for i, j in zip(pt, shape):
        if i < 0:   # index is not negative
            return False
        if i >= j:    # index is less than j
            return False
    return True