Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed paddle_backend.greater and paddle_backend.greater_equal #28111

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ivy/functional/backends/paddle/elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,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 @@ -487,8 +487,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
Loading