Skip to content

Commit

Permalink
Integrating backend_to_test to scipy.fft tests (ivy-llc#22775)
Browse files Browse the repository at this point in the history
  • Loading branch information
mobley-trent authored and arshPratap committed Sep 11, 2023
1 parent b9bd2ac commit f86b727
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ivy/functional/frontends/scipy/fft/fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize

# ifft
@to_ivy_arrays_and_back
def ifft(x, n=None, axis=-1, norm="backward", overwrite_x=False):
def ifft(x, n=None, axis=-1, norm=None, overwrite_x=False):
return ivy.ifft(x, axis, norm=norm, n=n)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ def test_scipy_dct(
test_flags,
fn_tree,
on_device,
backend_fw,
):
input_dtype, x, _type, n, axis, norm = dtype_x_and_args
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,
Expand Down Expand Up @@ -221,11 +223,13 @@ def test_scipy_fft(
test_flags,
fn_tree,
on_device,
backend_fw,
):
dtype, x, dim, norm, n = d_x_d_n_n
helpers.test_frontend_function(
input_dtypes=dtype,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
Expand All @@ -248,11 +252,13 @@ def test_scipy_fft2(
test_flags,
fn_tree,
on_device,
backend_fw,
):
dtype, x, s, ax, norm = d_x_d_s_n
helpers.test_frontend_function(
input_dtypes=dtype,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
Expand All @@ -275,11 +281,13 @@ def test_scipy_idct(
test_flags,
fn_tree,
on_device,
backend_fw,
):
input_dtype, x, _type, n, axis, norm = dtype_x_and_args
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,
Expand All @@ -305,16 +313,18 @@ def test_scipy_ifft(
test_flags,
fn_tree,
on_device,
backend_fw,
):
dtype, x, dim, norm, n = d_x_d_n_n
helpers.test_frontend_function(
input_dtypes=dtype,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
x=x,
dim=dim,
axis=dim,
norm=norm,
n=n,
)
Expand All @@ -332,12 +342,14 @@ def test_scipy_ifftn(
test_flags,
fn_tree,
on_device,
backend_fw,
):
dtype, x, s, ax, norm, workers = d_x_d_s_n_workers
helpers.test_frontend_function(
input_dtypes=dtype,
frontend=frontend,
test_flags=test_flags,
backend_to_test=backend_fw,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
Expand Down

0 comments on commit f86b727

Please sign in to comment.