diff --git a/ivy/functional/frontends/torch/pointwise_ops.py b/ivy/functional/frontends/torch/pointwise_ops.py index 241ff86924afb..feadae36efa07 100644 --- a/ivy/functional/frontends/torch/pointwise_ops.py +++ b/ivy/functional/frontends/torch/pointwise_ops.py @@ -402,3 +402,7 @@ def logaddexp2(x1, x2, out=None): @with_unsupported_dtypes({"1.11.0 and below": ("float16",)}, "torch") def i0(x, out=None): return ivy.i0(x, out=out) + + +def rad2deg(input, *, out=None): + return ivy.rad2deg(input, out=out) diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py index 06a352bd4a580..23f2205aff18f 100644 --- a/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py +++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py @@ -2180,3 +2180,41 @@ def test_torch_i0( rtol=1e-05, x=x[0], ) + + +# rad2deg +@handle_frontend_test( + fn_tree="torch.rad2deg", + dtype_and_x=helpers.dtype_and_values( + available_dtypes=helpers.get_dtypes("float"), + num_arrays=2, + shared_dtype=True, + max_dim_size=3, + max_num_dims=3, + min_dim_size=1, + min_num_dims=1 + ), +) +def test_torch_rad2deg( + *, + dtype_and_x, + as_variable, + with_out, + num_positional_args, + native_array, + on_device, + fn_tree, + frontend, +): + 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=frontend, + fn_tree=fn_tree, + on_device=on_device, + input=x[0], + )