ivy
ivy copied to clipboard
Make `Numpy` args compitable with `torch` function.
Close #17950
Also, fixed squeeze
method not getting properly called at torch_frontend.median
implementation.
As discussed with @AnnaTz ; to provide the same compatibility that torch
offers within its framework to allow Numpy
args as an alias for torch
args, we want to add the same functionality to ivy
.
Currently, this checks compatibility for all functions at ivy/functional/frontends/torch/reduction_ops.py
I'd say you can go ahead and add the decorator to all torch frontend functions that have an aliased argument.
One ore thing, ideally we would like to have a test for the decorator as well. You can have a look at the rest of the func_wrapper
tests I have implemented if you'd like to do this yourself. Otherwise I can do this.
One ore thing, ideally we would like to have a test for the decorator as well. You can have a look at the rest of the
func_wrapper
tests I have implemented if you'd like to do this yourself. Otherwise I can do this.
The test for it should be added at ivy_tests/test_ivy/test_misc/test_func_wrapper.py
?
One ore thing, ideally we would like to have a test for the decorator as well. You can have a look at the rest of the
func_wrapper
tests I have implemented if you'd like to do this yourself. Otherwise I can do this.The test for it should be added at
ivy_tests/test_ivy/test_misc/test_func_wrapper.py
?
ivy_tests/test_ivy/test_frontends/test_torch/test_func_wrapper.py
Hey @AnnaTz , thanks for the review and all the suggestions! Had a blast working on this one. Going to do a double-check on the rest of the files at torch_frontend
to make sure I didn't skip over anything. Catch you in the next PR!