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 pointwise_ops.torch.real for paddle backend #28115

Merged
merged 10 commits into from
Mar 11, 2024
23 changes: 4 additions & 19 deletions ivy/functional/backends/paddle/elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,26 +894,11 @@ def logaddexp2(
return ivy.log2(ivy.exp2(x1) + ivy.exp2(x2))


@with_unsupported_device_and_dtypes(
{
"2.6.0 and below": {
"cpu": (
"int8",
"int16",
"int32",
"int64",
"uint8",
"float16",
"float32",
"float64",
"bool",
)
}
},
backend_version,
)
def real(x: paddle.Tensor, /, *, out: Optional[paddle.Tensor] = None) -> paddle.Tensor:
return paddle.real(x)
if paddle.is_complex(x):
return paddle.real(x)
else:
return x


@with_supported_device_and_dtypes(
Expand Down
2 changes: 1 addition & 1 deletion ivy/functional/backends/tensorflow/elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def logaddexp(
return tf.experimental.numpy.logaddexp(x1, x2)


@with_unsupported_dtypes({"2.15.0 and below": ("float16",)}, backend_version)
@with_unsupported_dtypes({"2.15.0 and below": ("bool",)}, backend_version)
def real(
x: Union[tf.Tensor, tf.Variable],
/,
Expand Down
Loading