File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1093,6 +1093,30 @@ def __invert__(self):
10931093 safe_call (backend .get ().af_bitnot (c_pointer (out .arr ), self .arr ))
10941094 return out
10951095
1096+ def logical_not (self ):
1097+ """
1098+ Return ~self
1099+ """
1100+ out = Array ()
1101+ safe_call (backend .get ().af_not (c_pointer (out .arr ), self .arr ))
1102+ return out
1103+
1104+ def logical_and (self , other ):
1105+ """
1106+ Return self && other.
1107+ """
1108+ out = Array ()
1109+ safe_call (backend .get ().af_and (c_pointer (out .arr ), self .arr , other .arr )) #TODO: bcast var?
1110+ return out
1111+
1112+ def logical_or (self , other ):
1113+ """
1114+ Return self || other.
1115+ """
1116+ out = Array ()
1117+ safe_call (backend .get ().af_or (c_pointer (out .arr ), self .arr , other .arr )) #TODO: bcast var?
1118+ return out
1119+
10961120 def __nonzero__ (self ):
10971121 return self != 0
10981122
You can’t perform that action at this time.
0 commit comments