Skip to content

Commit

Permalink
Added is_floating_point to paddle frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
arshPratap committed Sep 4, 2023
1 parent 9e0d736 commit 18018cb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ivy/functional/frontends/paddle/tensor/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,3 +726,6 @@ def argmin(self, axis=None, keepdim=False, dtype=None, name=None):
@with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
def remainder(self, y, name=None):
return ivy.remainder(self._ivy_array, y)

def is_floating_point(self):
return paddle_frontend.is_floating_point(self._ivy_array)
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,39 @@ def test_paddle_instance_var(
)


# is_floating_point
@handle_frontend_method(
class_tree=CLASS_TREE,
init_tree="paddle.to_tensor",
method_name="is_floating_point",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=["int16", "int32", "int64", "float32", "float64"],
),
)
def test_paddle_is_floating_point(
dtype_and_x,
frontend_method_data,
init_flags,
method_flags,
frontend,
backend_fw,
on_device,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_method(
init_input_dtypes=input_dtype,
init_all_as_kwargs_np={"data": x[0]},
method_input_dtypes=input_dtype,
backend_to_test=backend_fw,
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,
)


# abs
@handle_frontend_method(
class_tree=CLASS_TREE,
Expand Down

0 comments on commit 18018cb

Please sign in to comment.