diff --git a/ivy/functional/frontends/paddle/fft.py b/ivy/functional/frontends/paddle/fft.py index 2d0605c823939..a0cfb5a5a85a6 100644 --- a/ivy/functional/frontends/paddle/fft.py +++ b/ivy/functional/frontends/paddle/fft.py @@ -100,3 +100,6 @@ def ifftshift(x, axes=None, name=None): roll = ivy.roll(x, shifts, axis=axes) return roll +@to_ivy_arrays_and_back +def ifft2(x, n=None, axis=(-2, -1), norm="backward", name=None): + return ifft2(x, n, axis, norm) \ No newline at end of file diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py index 98a1b26d91a73..1068994db83b0 100644 --- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py +++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py @@ -187,3 +187,44 @@ def test_paddle_ifftshift( x=x[0], axes=axes, ) + +#ifft2 +@handle_frontend_test( + fn_tree="paddle.fft.ifft2", + dtype_x_axis=helpers.dtype_values_axis( + available_dtypes=helpers.get_dtypes("valid"), + min_value=-10, + max_value=10, + min_num_dims=1, + min_dim_size=2, + valid_axis=True, + force_int_axis=True, + ), + n=st.one_of( + st.integers(min_value=2, max_value=10), + st.just(None), + ), + norm=st.sampled_from(["backward", "ortho", "forward"]), +) +def test_paddle_ifft2( + dtype_x_axis, + n, + norm, + frontend, + test_flags, + fn_tree, + backend_fw, +): + input_dtypes, x, axis = dtype_x_axis + helpers.test_frontend_function( + input_dtypes=input_dtypes, + backend_to_test=backend_fw, + frontend=frontend, + test_flags=test_flags, + fn_tree=fn_tree, + x=x[0], + n=n, + axis=axis, + norm=norm, + force_int_axis=True, + )