Skip to content

Commit

Permalink
Updated test_stat.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskiratsingh2000 authored Sep 13, 2023
1 parent b96d8e4 commit f4ccb72
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions ivy_tests/test_ivy/test_frontends/test_paddle/test_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,46 +128,47 @@ def test_paddle_numel(
x=x[0],
)


# std
# quantile
@handle_frontend_test(
fn_tree="paddle.std",
dtype_and_x=_statistical_dtype_values(function="std"),
unbiased=st.booleans(),
fn_tree="paddle.quantile",
dtype_and_x=_statistical_dtype_values(function="quantile"),
q=st.floats(0.0, 1.0),
keepdim=st.booleans(),
)
def test_paddle_std(
def test_paddle_quantile(
*,
unbiased,
dtype_and_x,
q,
keepdim,
on_device,
fn_tree,
frontend,
backend_fw,
test_flags,
):
input_dtype, x, axis, _ = dtype_and_x
input_dtypes, x, axis = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
backend_to_test=backend_fw,
input_dtypes=input_dtypes,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
q=q,
axis=axis,
unbiased=unbiased,
keepdim=keepdim,
)


# var
# std
@handle_frontend_test(
fn_tree="paddle.var",
dtype_and_x=_statistical_dtype_values(function="var"),
fn_tree="paddle.std",
dtype_and_x=_statistical_dtype_values(function="std"),
unbiased=st.booleans(),
keepdim=st.booleans(),
)
def test_paddle_var(
def test_paddle_std(
*,
unbiased,
dtype_and_x,
Expand All @@ -190,34 +191,33 @@ def test_paddle_var(
keepdim=keepdim,
)

# quantile

# var
@handle_frontend_test(
fn_tree="paddle.quantile",
dtype_and_x=_statistical_dtype_values(function="quantile"),
q=st.floats(0.0, 1.0),
fn_tree="paddle.var",
dtype_and_x=_statistical_dtype_values(function="var"),
unbiased=st.booleans(),
keepdim=st.booleans(),
)
def test_paddle_quantile(
def test_paddle_var(
*,
unbiased,
dtype_and_x,
q,
keepdim,
on_device,
fn_tree,
frontend,
backend_fw,
test_flags,
):
input_dtypes, x, axis = dtype_and_x
input_dtype, x, axis, _ = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtypes,
frontend=frontend,
input_dtypes=input_dtype,
backend_to_test=backend_fw,
frontend=frontend,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
q=q,
axis=axis,
unbiased=unbiased,
keepdim=keepdim,
)

0 comments on commit f4ccb72

Please sign in to comment.