File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1093,6 +1093,30 @@ def __invert__(self):
1093
1093
safe_call (backend .get ().af_bitnot (c_pointer (out .arr ), self .arr ))
1094
1094
return out
1095
1095
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
+
1096
1120
def __nonzero__ (self ):
1097
1121
return self != 0
1098
1122
You can’t perform that action at this time.
0 commit comments