From 144911e794a6fabc00638669cefb9f0ad6adebb8 Mon Sep 17 00:00:00 2001 From: sbansal1999 Date: Thu, 23 Feb 2023 11:25:07 +0530 Subject: [PATCH] asin --- ivy/functional/frontends/tensorflow/math.py | 5 ++++ .../test_tensorflow/test_math.py | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/ivy/functional/frontends/tensorflow/math.py b/ivy/functional/frontends/tensorflow/math.py index 1cbca0bc6a684..f8a4fc1ba2503 100644 --- a/ivy/functional/frontends/tensorflow/math.py +++ b/ivy/functional/frontends/tensorflow/math.py @@ -428,3 +428,8 @@ def nextafter(x1, x2, name=None): @to_ivy_arrays_and_back def log_softmax(logits, axis=None): return ivy.log_softmax(logits, axis=axis) + + +@to_ivy_arrays_and_back +def asin(x, name=None): + return ivy.asin(x) diff --git a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py index ef2606467d74d..770f844dfea01 100644 --- a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py +++ b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py @@ -1469,3 +1469,32 @@ def test_tensorflow_log_softmax( on_device=on_device, logits=x[0], ) + + +# asin +@handle_frontend_test( + fn_tree="tensorflow.math.asin", + dtype_and_x=helpers.dtype_and_values( + available_dtypes=helpers.get_dtypes("float"), + min_value=-1, + max_value=1, + ), + test_with_out=st.just(False), +) +def test_tensorflow_asin( + *, + 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], + )