@@ -70,6 +70,38 @@ def astype(self, dtype):
7070 def __neg__ (self ):
7171 return _op_make .negative (self )
7272
73+ def __lt__ (self , other ):
74+ if isinstance (other , Expr ):
75+ return _op_make .less (self , other )
76+ elif isinstance (other , _Number ):
77+ raise TypeError ('convert "%s" with `const` first' % str (other ))
78+ else :
79+ raise TypeError ("type %s not supported" % str (type (other )))
80+
81+ def __gt__ (self , other ):
82+ if isinstance (other , Expr ):
83+ return _op_make .greater (self , other )
84+ elif isinstance (other , _Number ):
85+ raise TypeError ('convert "%s" with `const` first' % str (other ))
86+ else :
87+ raise TypeError ("type %s not supported" % str (type (other )))
88+
89+ def __ge__ (self , other ):
90+ if isinstance (other , Expr ):
91+ return _op_make .greater_equal (self , other )
92+ elif isinstance (other , _Number ):
93+ raise TypeError ('convert "%s" with `const` first' % str (other ))
94+ else :
95+ raise TypeError ("type %s not supported" % str (type (other )))
96+
97+ def __le__ (self , other ):
98+ if isinstance (other , Expr ):
99+ return _op_make .less_equal (self , other )
100+ elif isinstance (other , _Number ):
101+ raise TypeError ('convert "%s" with `const` first' % str (other ))
102+ else :
103+ raise TypeError ("type %s not supported" % str (type (other )))
104+
73105 def __add__ (self , other ):
74106 if isinstance (other , Expr ):
75107 return _op_make .add (self , other )
0 commit comments