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: fixed ivy.cumsum tests at all backend #27974

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions ivy/functional/backends/jax/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def cumprod(
return jnp.flip(x, axis=axis)


@with_unsupported_dtypes({"0.4.23 and below": "bool"}, backend_version)
def cumsum(
x: JaxArray,
axis: int = 0,
Expand Down
1 change: 1 addition & 0 deletions ivy/functional/backends/tensorflow/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def cumprod(
return tf.math.cumprod(x, axis, exclusive, reverse)


@with_unsupported_dtypes({"2.15.0 and below": "bool"}, backend_version)
def cumsum(
x: Union[tf.Tensor, tf.Variable],
axis: int = 0,
Expand Down
4 changes: 2 additions & 2 deletions ivy/functional/backends/torch/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ def cumprod(
# TODO: bfloat16 support is added in PyTorch 1.12.1
@with_unsupported_dtypes(
{
"1.12.1 and below": ("uint8", "float16", "bfloat16"),
"1.12.1 and above": ("uint8", "float16"),
"1.12.1 and below": ("uint8", "bool", "float16", "bfloat16"),
"1.12.1 and above": ("uint8", "bool", "float16"),
},
backend_version,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def test_cumprod(
dtype_x_axis_castable=_get_castable_dtype(),
exclusive=st.booleans(),
reverse=st.booleans(),
test_gradients=st.just(False),
)
def test_cumsum(
*,
Expand Down
Loading