Skip to content

Commit

Permalink
Fixed small bug with tf.Tensor.__mul__, order of arguments was wrong …
Browse files Browse the repository at this point in the history
…and dtype check threw errors
  • Loading branch information
fspyridakos committed Mar 3, 2023
1 parent b5f7b41 commit 5b9ab2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ivy/functional/frontends/tensorflow/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def __matmul__(self, y, name="matmul"):
return y.__rmatmul__(self._ivy_array)

def __mul__(self, x, name="mul"):
return tf_frontend.math.multiply(x, self._ivy_array, name=name)
return tf_frontend.math.multiply(self._ivy_array, x, name=name)

def __mod__(self, x, name="mod"):
return ivy.remainder(x, self._ivy_array, name=name)
Expand Down Expand Up @@ -194,13 +194,13 @@ def __truediv__(self, y, name="truediv"):
return tf_frontend.math.truediv(
tf_frontend.cast(self, ivy.float32),
tf_frontend.cast(y, ivy.float32),
name=name
name=name,
)
if str(dtype) in ["uint32", "int32", "uint64", "int64"]:
return tf_frontend.math.truediv(
tf_frontend.cast(self, ivy.float64),
tf_frontend.cast(y, ivy.float64),
name=name
name=name,
)
return tf_frontend.math.truediv(self._ivy_array, y, name=name)

Expand Down

0 comments on commit 5b9ab2b

Please sign in to comment.