Skip to content

Commit

Permalink
Corrected operator true_divide with divide
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Aug 2, 2023
1 parent 4ec43bf commit 75cd2da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dpctl/tensor/_usmarray.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1202,9 +1202,9 @@ cdef class usm_ndarray:
def __truediv__(first, other):
"See comment in __add__"
if isinstance(first, usm_ndarray):
return _dispatch_binary_elementwise(first, "true_divide", other)
return _dispatch_binary_elementwise(first, "divide", other)
elif isinstance(other, usm_ndarray):
return _dispatch_binary_elementwise2(first, "true_divide", other)
return _dispatch_binary_elementwise2(first, "divide", other)
return NotImplemented

def __xor__(first, other):
Expand Down Expand Up @@ -1249,7 +1249,7 @@ cdef class usm_ndarray:
return _dispatch_binary_elementwise2(other, "subtract", self)

def __rtruediv__(self, other):
return _dispatch_binary_elementwise2(other, "true_divide", self)
return _dispatch_binary_elementwise2(other, "divide", self)

def __rxor__(self, other):
return _dispatch_binary_elementwise2(other, "logical_xor", self)
Expand Down

0 comments on commit 75cd2da

Please sign in to comment.