Skip to content

Commit

Permalink
added tensorflow math
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaTz committed Mar 6, 2023
1 parent edcecb2 commit 1ee10df
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ivy/functional/frontends/tensorflow/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@ def is_nan(x, name=None):
def is_finite(x, name=None):
return ivy.isfinite(x)


@to_ivy_arrays_and_back
def atan(x, name=None):
return ivy.atan(x)


@to_ivy_arrays_and_back
def log(x, name=None):
return ivy.log(x)

27 changes: 26 additions & 1 deletion ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -1765,4 +1765,29 @@ def test_tensorflow_atan(
on_device=on_device,
x=x[0],
)



# log
@handle_frontend_test(
fn_tree="tensorflow.math.log",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("float"),
),
)
def test_tensorflow_log(
*,
dtype_and_x,
on_device,
fn_tree,
frontend,
test_flags,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
)

0 comments on commit 1ee10df

Please sign in to comment.