We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 503b49d commit 6aacf08Copy full SHA for 6aacf08
arrayfire/array.py
@@ -176,6 +176,7 @@ def __imul__(self, other):
176
def __rmul__(self, other):
177
return binary_funcr(other, self, clib.af_mul)
178
179
+ # Necessary for python3
180
def __truediv__(self, other):
181
return binary_func(self, other, clib.af_div)
182
@@ -186,6 +187,17 @@ def __itruediv__(self, other):
186
187
def __rtruediv__(self, other):
188
return binary_funcr(other, self, clib.af_div)
189
190
+ # Necessary for python2
191
+ def __div__(self, other):
192
+ return binary_func(self, other, clib.af_div)
193
+
194
+ def __idiv__(self, other):
195
+ self = binary_func(self, other, clib.af_div)
196
+ return self
197
198
+ def __rdiv__(self, other):
199
+ return binary_funcr(other, self, clib.af_div)
200
201
def __mod__(self, other):
202
return binary_func(self, other, clib.af_mod)
203
0 commit comments