Sympy has intervals , rational numbers, and infinity. The Interval class is a subclass of the Set class.
# oo is the symbol for infinity from sympy import Interval, oo, Rational i1 = Interval(10, 15) i2 = Interval(0, oo) i3 = Interval(-5, -1)
Gary kerr
source share