diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py index 88712caea9fa7..f365206aaebe4 100644 --- a/ivy/functional/frontends/paddle/tensor/math.py +++ b/ivy/functional/frontends/paddle/tensor/math.py @@ -184,6 +184,12 @@ def exp(x, name=None): return ivy.exp(x) +@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle") +@to_ivy_arrays_and_back +def exp_(x, name=None): + return ivy.inplace_update(x, exp(x)) + + @with_supported_dtypes({"2.5.1 and below": ("float16", "float32", "float64")}, "paddle") @to_ivy_arrays_and_back def expm1(x, name=None): diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py index b08945c501d2d..0ff6c7024b911 100644 --- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py +++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py @@ -790,6 +790,34 @@ def test_paddle_exp( ) +# exp +@handle_frontend_test( + fn_tree="paddle.exp", + dtype_and_x=helpers.dtype_and_values( + available_dtypes=helpers.get_dtypes("valid"), + ), +) +def test_paddle_exp_( + *, + 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], + ) + + # expm1 @handle_frontend_test( fn_tree="paddle.expm1",