Example #1
0
def test_segment_exclusive_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.exclusive(s2, s3))
Example #2
0
def test_segment_exclusive():
    s1 = Segment([[0, 10], [20, 30], [50, 100]])
    s2 = Segment([[4, 6], [15, 25], [40, 200]])
    s1.exclusive(s2)
    np.testing.assert_equal(s1._data, np.array([[0, 4], [6, 10], [25, 30]]))