Skip to content

Commit

Permalink
Revert " feat : added nansum function for Pytorch frontend (ivy-llc#2…
Browse files Browse the repository at this point in the history
…3206)"

This reverts commit d2489d5.
  • Loading branch information
juliagsy authored and iababio committed Sep 27, 2023
1 parent 4279777 commit 83f8a00
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .idea/ivy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/_template__of_py_test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions ivy/functional/frontends/torch/reduction_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ def moveaxis(input, source, destination):
def nanmean(input, dim=None, keepdim=False, *, dtype=None, out=None):
return ivy.nanmean(input, axis=dim, keepdims=keepdim, dtype=dtype, out=out)

@numpy_to_torch_style_args
@to_ivy_arrays_and_back
def nansum(input, dim=None, keepdim=False, dtype=None, out=None):
return ivy.nansum(input, axis=dim, keepdims=keepdim, dtype=dtype, out=out)


@to_ivy_arrays_and_back
@with_supported_dtypes(
Expand Down
33 changes: 0 additions & 33 deletions ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,39 +671,6 @@ def test_torch_nanmean(
keepdim=keepdims,
)

@handle_frontend_test(
fn_tree="torch.nansum",
dtype_and_x=_statistical_dtype_values(
function="nansum",
min_value=-1e04,
max_value=1e04,
),
keepdims=st.booleans(),
)
def test_torch_nansum(
*,
dtype_and_x,
keepdims,
on_device,
fn_tree,
frontend,
test_flags,
backend_fw,
):
input_dtype, x, axis = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
backend_to_test=backend_fw,
frontend=frontend,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
input=x[0],
dim=axis,
keepdim=keepdims,
rtol=1e-02,
atol=1e-02,
)

@handle_frontend_test(
fn_tree="torch.nansum",
Expand Down

0 comments on commit 83f8a00

Please sign in to comment.