diff --git a/ivy/functional/frontends/paddle/manipulation.py b/ivy/functional/frontends/paddle/manipulation.py index fbf633158dbcd..46a5cc10b9114 100644 --- a/ivy/functional/frontends/paddle/manipulation.py +++ b/ivy/functional/frontends/paddle/manipulation.py @@ -180,6 +180,11 @@ def tile(x, repeat_times, name=None): return ivy.tile(x, repeats=repeat_times) +@to_ivy_arrays_and_back +def tolist(x): + return ivy.to_list(x) + + @with_supported_dtypes( {"2.5.1 and below": ("bool", "int32", "int64", "float16", "float32", "float64")}, "paddle", diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py index af11f5e257e7d..413f799ef4d9d 100644 --- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py +++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py @@ -756,6 +756,32 @@ def test_paddle_tile( ) +@handle_frontend_test( + fn_tree="paddle.tolist", + dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("valid")), + test_with_out=st.just(False), +) +def test_paddle_tolist( + *, + dtype_and_x, + on_device, + fn_tree, + backend_fw, + frontend, + test_flags, +): + x_dtype, x = dtype_and_x + helpers.test_frontend_function( + input_dtypes=x_dtype, + backend_to_test=backend_fw, + frontend=frontend, + test_flags=test_flags, + fn_tree=fn_tree, + on_device=on_device, + x=x[0], + ) + + # unbind @handle_frontend_test( fn_tree="paddle.unbind",