ivy-llc / ivy

Convert Machine Learning Code Between Frameworks
https://ivy.dev
Other
14.01k stars 5.75k forks source link

Reformat elementwise #761

Open Ishticode opened 2 years ago

Ishticode commented 2 years ago

As explained in the function reformatting open task, each function in the elementwise submodule should be updated to follow the implementation instructions given in the Deep Dive section of the docs. The updates should be applied for both the Ivy API and Backend API. The Deep Dive is the best general resource for learning in detail how functions should be implemented. Many of the functions are not implemented as they should be. You will need to make changes to the current implementations, but you do not need to go through all section of the Deep Dive. Specifically, you should make the following changes, where appropriate:

  1. remove all lambda and direct bindings for backend functions, with each function instead defined using def.
  2. update the function arguments and type hints.
  3. add the correct docstrings
  4. add thorough docstring examples

_

Please keep in mind that the proper way to link an issue to this list is to comment "- [ ] #issue_number" while the issue's title only includes the name of the function you've chosen.

_

The main file paths where these functions are likely to be added are:

  • ivy/functional/ivy/elementwise.py
  • ivy/array/elementwise.py
  • ivy/container/elementwise.py
  • ivy/functional/backends/mxnet/elementwise.py
  • ivy/array/manipulation.py
  • ivy/container/manipulation.py
  • ivy/functional/backends/jax/elementwise.py
  • ivy/functional/backends/jax/manipulation.py
  • ivy/functional/backends/mxnet/manipulation.py
  • ivy/functional/backends/numpy/manipulation.py
  • ivy/functional/backends/tensorflow/elementwise.py
  • ivy/functional/backends/tensorflow/manipulation.py
  • ivy/functional/backends/torch/manipulation.py
  • ivy/functional/ivy/manipulation.py
  • ivy/functional/backends/numpy/elementwise.py
  • ivy/functional/backends/torch/elementwise.py
  • ivy/array/array.py
  • ivy/container/container.py
MuhammadNizamani commented 1 year ago
Mr-Array22 commented 9 months ago

[ ]#28185