Skip to content

Commit

Permalink
fix: fixed paddle_backend.greater and paddle_backend.greater_equal (
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai-Suraj-27 committed Jan 31, 2024
1 parent fbc7375 commit 4b86561
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ivy/functional/backends/paddle/elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ def greater(
out: Optional[paddle.Tensor] = None,
) -> paddle.Tensor:
x1, x2, ret_dtype = _elementwise_helper(x1, x2)
if paddle.is_complex(x1):
if paddle.is_complex(x1):
if isinstance(x1, paddle.Tensor) and isinstance(x2, paddle.Tensor):
if paddle.is_complex(x1) and paddle.is_complex(x2):
real = paddle.greater_than(x1.real(), x2.real())
imag = paddle.greater_than(x1.imag(), x2.imag())
return paddle.logical_and(real, imag)
Expand Down Expand Up @@ -488,8 +488,8 @@ def greater_equal(
out: Optional[paddle.Tensor] = None,
) -> paddle.Tensor:
x1, x2, ret_dtype = _elementwise_helper(x1, x2)
if paddle.is_complex(x1):
if paddle.is_complex(x1):
if isinstance(x1, paddle.Tensor) and isinstance(x2, paddle.Tensor):
if paddle.is_complex(x1) and paddle.is_complex(x2):
real = paddle.greater_equal(x1.real(), x2.real())
imag = paddle.greater_equal(x1.imag(), x2.imag())
return paddle.logical_and(real, imag)
Expand Down

0 comments on commit 4b86561

Please sign in to comment.