Exemple #1
0
def test_segment_union_2():
    s1 = Segment([[0, 10], [20, 30], [50, 100]])
    s2 = Segment([[4, 6], [15, 25], [40, 200]])
    s3 = Segment([[8, 20], [35, 60], [150, 180]])
    nose.tools.assert_equal(s1 | s2 | s3, s1.union(s2, s3))
Exemple #2
0
def test_segment_union():
    s1 = Segment([[0, 10], [20, 30], [50, 100]])
    s2 = Segment([[4, 6], [15, 25], [40, 200]])
    s1.union(s2)
    np.testing.assert_equal(s1._data, np.array([[0, 10], [15, 30], [40, 200]]))