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

feat: added log10 function in paddle frontend #24461

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions ivy/functional/frontends/paddle/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ def log1p(x, name=None):
def log2(x, name=None):
return ivy.log2(x)

@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
@to_ivy_arrays_and_back
def log10(x, name=None):
return ivy.log10(x)


@with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
@to_ivy_arrays_and_back
Expand Down
26 changes: 26 additions & 0 deletions ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,32 @@ def test_paddle_log2(
x=x[0],
)

@handle_frontend_test(
fn_tree="paddle.log10",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("valid"),
),
)
def test_paddle_log10(
*,
dtype_and_x,
on_device,
fn_tree,
frontend,
backend_fw,
test_flags,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
)


# logit
@handle_frontend_test(
Expand Down
Loading