Closed arimbr closed 9 years ago
I get these results
In [8]: IntInterval((1, 2)) & IntInterval([1, 2]) Out[8]: IntInterval('[1, 2)')
In [9]: IntInterval([1, 2]) & IntInterval((1, 2)) Out[9]: IntInterval('(1, 2]')
I would expect these to be True
IntInterval((1, 2)) & IntInterval([1, 2]) == IntInterval((1, 2)) IntInterval([1, 2]) & IntInterval((1, 2)) == IntInterval((1, 2))
Nor 1 or 2 should be included in the intersection in my opinion (I am considering the intersection to be the elements that are present in both intervals), but in any case the intersection should be commutative.
I get these results
In [8]: IntInterval((1, 2)) & IntInterval([1, 2]) Out[8]: IntInterval('[1, 2)')
In [9]: IntInterval([1, 2]) & IntInterval((1, 2)) Out[9]: IntInterval('(1, 2]')
I would expect these to be True
IntInterval((1, 2)) & IntInterval([1, 2]) == IntInterval((1, 2)) IntInterval([1, 2]) & IntInterval((1, 2)) == IntInterval((1, 2))
Nor 1 or 2 should be included in the intersection in my opinion (I am considering the intersection to be the elements that are present in both intervals), but in any case the intersection should be commutative.