Exemplo n.º 1
0
def closeto_bbox(b1, b2):
    xmin1, xmax1 = b1.intervalx().get_bounds()
    ymin1, ymax1 = b1.intervaly().get_bounds()
    xmin2, xmax2 = b2.intervalx().get_bounds()
    ymin2, ymax2 = b2.intervaly().get_bounds()

    pairs = ( (xmin1, xmin2), (xmax1, xmax2), (ymin1, ymin2), (ymax1, ymax2))
    return alltrue([closeto(x,y) for x,y in pairs])
Exemplo n.º 2
0
def closeto_bbox(b1, b2):
    xmin1, xmax1 = b1.intervalx().get_bounds()
    ymin1, ymax1 = b1.intervaly().get_bounds()
    xmin2, xmax2 = b2.intervalx().get_bounds()
    ymin2, ymax2 = b2.intervaly().get_bounds()

    pairs = ((xmin1, xmin2), (xmax1, xmax2), (ymin1, ymin2), (ymax1, ymax2))
    return alltrue([closeto(x, y) for x, y in pairs])
Exemplo n.º 3
0
def seq_allequal(seq1, seq2):
    """
    seq1 and seq2 are either None or sequences or numerix arrays
    Return True if both are None or both are seqs with identical
    elements
    """
    if seq1 is None:
        return seq2 is None

    if seq2 is None:
        return False
    #ok, neither are None:, assuming iterable

    if len(seq1) != len(seq2): return False
    return alltrue(equal(seq1, seq2))
Exemplo n.º 4
0
def seq_allequal(seq1, seq2):
    """
    seq1 and seq2 are either None or sequences or numerix arrays
    Return True if both are None or both are seqs with identical
    elements
    """
    if seq1 is None:
        return seq2 is None

    if seq2 is None:
        return False
    #ok, neither are None:, assuming iterable
        
    if len(seq1) != len(seq2): return False
    return alltrue(equal(seq1, seq2))
Exemplo n.º 5
0
def closeto_seq(xs,ys):
    return alltrue([closeto(x,y) for x,y in zip(xs, ys)])
Exemplo n.º 6
0
def closeto_seq(xs, ys):
    return alltrue([closeto(x, y) for x, y in zip(xs, ys)])