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

reciprocal_ #23248

Merged
merged 9 commits into from
Sep 25, 2023
5 changes: 5 additions & 0 deletions ivy/functional/frontends/paddle/tensor/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,11 @@ def remainder(self, y, name=None):
def is_floating_point(self):
return paddle_frontend.is_floating_point(self._ivy_array)

@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @samthakur587 . There's a conflict here. It's a simple one. Can you resolve it please! 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! @HaiderSultanArc i resolved the conflict. now its ready to merge. 🚀

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @samthakur587 your tests are failing now. Can you have a look? Only look for your failing tests. You can ignore others. Thanks 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! the failing test is not related to my PR. what's happen i thing someone has made changes to testing pipeline. in local its showing this error.

image

I don't know what happening but its start after i pull the latest changes from ivy. 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sherry30 🤔 do you know something about this?

def reciprocal_(self, name=None):
y = self.reciprocal(self)
return ivy.inplace_update(self, y)

@with_unsupported_dtypes(
{"2.5.1 and below": ("complex", "uint8", "uint16")}, "paddle"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3016,6 +3016,41 @@ def test_paddle_tensor_reciprocal(
)


# reciprocal_
@handle_frontend_method(
class_tree=CLASS_TREE,
init_tree="paddle.to_tensor",
method_name="reciprocal_",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("valid"),
),
)
def test_paddle_tensor_reciprocal_(
dtype_and_x,
frontend_method_data,
init_flags,
method_flags,
frontend,
on_device,
backend_fw,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_method(
init_input_dtypes=input_dtype,
backend_to_test=backend_fw,
init_all_as_kwargs_np={
"data": x[0],
},
method_input_dtypes=input_dtype,
method_all_as_kwargs_np={},
frontend_method_data=frontend_method_data,
init_flags=init_flags,
method_flags=method_flags,
frontend=frontend,
on_device=on_device,
)


# remainder
@handle_frontend_method(
class_tree=CLASS_TREE,
Expand Down
Loading