diff --git a/ivy/functional/frontends/jax/numpy/name_space_functions.py b/ivy/functional/frontends/jax/numpy/name_space_functions.py index 13da8ac7e0c23..3b322d4849c2d 100644 --- a/ivy/functional/frontends/jax/numpy/name_space_functions.py +++ b/ivy/functional/frontends/jax/numpy/name_space_functions.py @@ -190,6 +190,26 @@ def sin(x): return ivy.sin(x) +@inputs_to_ivy_arrays +def arccos(x): + return ivy.acos(x) + + +@inputs_to_ivy_arrays +def arccosh(x): + return ivy.acosh(x) + + +@inputs_to_ivy_arrays +def arcsin(x): + return ivy.asin(x) + + +@inputs_to_ivy_arrays +def arcsinh(x): + return ivy.asinh(x) + + @inputs_to_ivy_arrays def fmax(x1, x2): ret = ivy.where( diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_namespace_functions.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_namespace_functions.py index da0c8f4e1e0b5..acfe6230fc898 100644 --- a/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_namespace_functions.py +++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_jax_numpy_namespace_functions.py @@ -984,3 +984,127 @@ def test_jax_numpy_zeros( shape=shape, dtype=dtypes[0], ) + + +# arccos +@handle_cmd_line_args +@given( + dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("float")), + dtype=helpers.get_dtypes("float", full=False, none=True), + num_positional_args=helpers.num_positional_args( + fn_name="ivy.functional.frontends.jax.numpy.arccos" + ), +) +def test_jax_numpy_arccos( + dtype_and_x, + dtype, + as_variable, + with_out, + num_positional_args, + native_array, + fw, +): + input_dtype, x = dtype_and_x + helpers.test_frontend_function( + input_dtypes=input_dtype, + as_variable_flags=as_variable, + with_out=with_out, + num_positional_args=num_positional_args, + native_array_flags=native_array, + frontend="jax", + fn_tree="numpy.arccos", + x=x[0], + ) + + +# arccosh +@handle_cmd_line_args +@given( + dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("float")), + dtype=helpers.get_dtypes("float", full=False, none=True), + num_positional_args=helpers.num_positional_args( + fn_name="ivy.functional.frontends.jax.numpy.arccosh" + ), +) +def test_jax_numpy_arccosh( + dtype_and_x, + dtype, + as_variable, + with_out, + num_positional_args, + native_array, + fw, +): + input_dtype, x = dtype_and_x + helpers.test_frontend_function( + input_dtypes=input_dtype, + as_variable_flags=as_variable, + with_out=with_out, + num_positional_args=num_positional_args, + native_array_flags=native_array, + frontend="jax", + fn_tree="numpy.arccosh", + x=x[0], + ) + + +# arcsin +@handle_cmd_line_args +@given( + dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("float")), + dtype=helpers.get_dtypes("float", full=False, none=True), + num_positional_args=helpers.num_positional_args( + fn_name="ivy.functional.frontends.jax.numpy.arcsin" + ), +) +def test_jax_numpy_arcsin( + dtype_and_x, + dtype, + as_variable, + with_out, + num_positional_args, + native_array, + fw, +): + input_dtype, x = dtype_and_x + helpers.test_frontend_function( + input_dtypes=input_dtype, + as_variable_flags=as_variable, + with_out=with_out, + num_positional_args=num_positional_args, + native_array_flags=native_array, + frontend="jax", + fn_tree="numpy.arcsin", + x=x[0], + ) + + +# arcsinh +@handle_cmd_line_args +@given( + dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("float")), + dtype=helpers.get_dtypes("float", full=False, none=True), + num_positional_args=helpers.num_positional_args( + fn_name="ivy.functional.frontends.jax.numpy.arcsinh" + ), +) +def test_jax_numpy_arcsinh( + dtype_and_x, + dtype, + as_variable, + with_out, + num_positional_args, + native_array, + fw, +): + input_dtype, x = dtype_and_x + helpers.test_frontend_function( + input_dtypes=input_dtype, + as_variable_flags=as_variable, + with_out=with_out, + num_positional_args=num_positional_args, + native_array_flags=native_array, + frontend="jax", + fn_tree="numpy.arcsinh", + x=x[0], + )