ivy icon indicating copy to clipboard operation
ivy copied to clipboard

Update torch.test_reduction_ops.test_torch_norm to support the testing of the dtype parameter

Open fabriziocacicia opened this issue 1 year ago • 2 comments

fabriziocacicia avatar Jun 20 '23 15:06 fabriziocacicia

If you are working on an open task, please edit the PR description to link to the issue you've created.

For more information, please check ToDo List Issues Guide.

Thank you :hugs:

ivy-leaves avatar Jun 20 '23 15:06 ivy-leaves

@Aarsh2001 I asked you to review since you was the reviewers of the last PR regarding test_torch_norm.

I saw that the dtype parameter of torch.norm was not tested so I edited the _get_axis_and_p to handle the generation of proper values of the dtype parameter according to the torch docs specifications.

I also edited the decorator of torch.norm since in the pytorch docs it's clearly stated that the function accepts only float and complex values (see input parameter description), then I replaced the with_unsupported_dtypesdecoretor with a with_supported_dtypes declaring only the correct ones.

fabriziocacicia avatar Jun 20 '23 15:06 fabriziocacicia

This PR has been labelled as stale because it has been inactive for more than 7 days. If you would like to continue working on this PR, then please add another comment or this PR will be closed in 7 days.

ivy-seed avatar Jul 02 '23 05:07 ivy-seed

This PR has been closed because it has been marked as stale for more than 7 days with no activity.

ivy-seed avatar Jul 21 '23 05:07 ivy-seed