Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failing tests for einops_reduce #6129

Merged
merged 2 commits into from
Oct 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ivy_tests/test_ivy/test_functional/test_core/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -1177,12 +1177,14 @@ def test_einops_rearrange(
("b c (h1 h2) (w1 w2) -> b c h1 w1", {"h2": 2, "w2": 2}),
]
),
floattypes=helpers.get_dtypes("float"),
reduction=st.sampled_from(["min", "max", "sum", "mean", "prod"]),
num_positional_args=helpers.num_positional_args(fn_name="einops_reduce"),
)
def test_einops_reduce(
dtype_x,
pattern_and_axes_lengths,
floattypes,
reduction,
with_out,
as_variable,
Expand All @@ -1194,7 +1196,7 @@ def test_einops_reduce(
):
pattern, axes_lengths = pattern_and_axes_lengths
dtype, x = dtype_x
if (reduction in ["mean", "prod"]) and (dtype not in helpers.get_dtypes("float")):
if (reduction in ["mean", "prod"]) and (dtype not in floattypes):
dtype = ["float32"]
helpers.test_function(
input_dtypes=dtype,
Expand Down