def valid_pt(pt,shape):
    """ Determind if point is valid in a given shaped array"""
    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