ivy icon indicating copy to clipboard operation
ivy copied to clipboard

Fixed subract fn

Open p3jitnath opened this issue 3 years ago • 6 comments

Reformatted subtract function - #4067

p3jitnath avatar Sep 05 '22 18:09 p3jitnath

Hi, any suggestions you would like for me to add?

p3jitnath avatar Sep 08 '22 19:09 p3jitnath

hi @nathzi1505 , could you please add the reformatting task's checklist as per the instructions here. 😅

This should hopefully take you only a few moments, but it is very important to ensure we don't miss anything, and it decreases the review time. 😋

Thanks!

abdrahmandiab avatar Sep 09 '22 12:09 abdrahmandiab

Sure @abdrahmandiab.

p3jitnath avatar Sep 09 '22 15:09 p3jitnath

Reformatting Task Checklist

IMPORTANT NOTICE 🚨:

The Ivy Docs represent the ground truth for the task descriptions and this checklist should only be used as a supplementary item to aid with the review process.

LEGEND 🗺:

  • ❌ : Check item is not completed.
  • ✅ : Check item is ready for review.
  • 🆘 : Stuck/Doubting implementation (PR author should add comments explaining why).
  • ⏩ : Check is not applicable to function (skip).
  • 🆗 : Check item is already implemented and does not require any edits.

CHECKS 📑:

    • [x] ⏩ : Make sure that the aforementioned methods are added into the correct category-specific parent class, such as ivy.ArrayWithElementwise, ivy.ContainerWithManipulation etc.
    • [x] ✅ : Add the correct Docstrings to every function and its relevant methods, including those you did not implement yourself. The following should be added:
        • [x] ⏩ : The function's Array API standard description in ivy/functional/elementwise.py. If the function is not part of the Array API standard then a description of similar style should be added to the same file. The following modifications should be made to the description:
          • [x] ⏩ : Remove type definitions in the Parameters and Returns sections.
          • [x] ⏩ : Add out to the Parameters section if function accepts an out argument.
          • [x] ⏩ : Replace out with ret in the Returns section.
    • [ ] ✅: Add thorough Docstring Examples for every function and its relevant methods and ensure they pass the docstring tests.

      Functional Examples in ivy/functional/elementwise.py.

        • [x] ✅: Cover all possible variants for each of the arguments independently (not combinatorily).
        • [x] ✅: Vary the values and input shapes considerably between examples.
        • [x] ✅: Start out simple and get more complex with each example.
        • [x] ✅ Show an example with:
          • [x] ✅: out unused.
          • [x] ✅: out used to update a new array y.
          • [x] ✅: out used to inplace update the input array x (if x has the same dtype and shape as the return).
        • [x] ✅: If broadcasting is relevant for the function, then show examples which highlight this.

      Nestable Function Examples in ivy/functional/elementwise.py. Only if the function supports nestable operations.

        • [x] ✅: Add an example that passes in an ivy.Container instance in place of one of the arguments.
        • [x] ✅: Add an example passes in ivy.Container instances for multiple arguments.

      Container Static Method Examples in ivy/container/elementwise.py.

        • [x] ✅ : The example from point (6.f) should be replicated, but added to the ivy.Container static method docstring in with ivy.<func_name> replaced with ivy.Container.static_<func_name> in the example.
        • [x] ✅ : The example from point (6.g) should be replicated, but added to the ivy.Container static method docstring, with ivy.<func_name> replaced with ivy.Container.static_<func_name> in the example.

      Array Instance Method Example in ivy/array/elementwise.py.

        • [x] ✅ : Call this instance method of the ivy.Array class.

      Container Instance Method Example in ivy/container/elementwise.py.

        • [x] ✅ : Call this instance method of the ivy.Container class.

      Array Operator Examples in ivy/array/array.py.

        • [x] ✅ : Call the operator on two ivy.Array instances.
        • [x] ✅ : Call the operator with an ivy.Array instance on the left and ivy.Container on the right.

      Array Reverse Operator Example in ivy/array/array.py.

        • [x] ✅ : Call the operator with a Number on the left and an ivy.Array instance on the right.

      Container Operator Examples in ivy/container/container.py.

        • [x] ✅ : Call the operator on two ivy.Container instances containing Number instances at the leaves.
        • [x] ✅ : Call the operator on two ivy.Container instances containing ivy.Array instances at the leaves.
        • [x] ✅ : Call the operator with an ivy.Container instance on the left and ivy.Array on the right.

      Container Reverse Operator Example in ivy/container/container.py.

        • [x] ✅ : Following example in the ivy.Container.__radd__ docstring, with the operator called with a Number on the left and an ivy.Container instance on the right.

      Tests

        • [x] ✅: Docstring examples tests passing.
        • [x] ✅: Lint checks passing.

p3jitnath avatar Sep 11 '22 02:09 p3jitnath

Hi @abdrahmandiab, I have added the checklist for your reference. Feel free to share any suggestions.

p3jitnath avatar Sep 13 '22 05:09 p3jitnath

Hi @abdrahmandiab, I have followed the checklist and have made changes as you suggested. Feel free to review them and suggest new ones if required. Thanks.

p3jitnath avatar Sep 13 '22 21:09 p3jitnath

Hi @abdrahmandiab, I have followed the checklist and have made changes as you suggested. Feel free to review them and suggest new ones if required. Thanks.

Hi @nathzi1505, sorry it took me a bit to get to this, I saw your review request a few days ago and completely forgot to do it! 😅

I am going to review this today hopefully, so be on the lookout for that soon! :) Sorry for the inconvenience and thanks!

abdrahmandiab avatar Sep 19 '22 13:09 abdrahmandiab

Hey @nathzi1505 , Just finished reviewing and merging your PR, everything looks perfect to me! 😇

Thank you so much for your hard work, and I apologize once again for the late review! 😅 Well done!

abdrahmandiab avatar Sep 19 '22 15:09 abdrahmandiab