-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor exists #22993
Refactor exists #22993
Conversation
…ay/general.py. Implemented container exists instance method with docstrings
Thanks for contributing to Ivy! 😊👏 |
… parameters from x to self.
…ces to both _static_exists and exists. I also changed the name of static_exists to _static_exists as that appears to be the more common naming convention. Updated docstrings for _static_exists and exists to include information about the new arguments added. I also updated the Returns docstring to futher specify that a container is returned which specifies if leaf nodes are None or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good!
Co-authored-by: @AnnaTz
PR Description
The docstrings, examples, hint types, and arguments for exists were mostly correct. I turned the passed in parameter to be positional only, as per the recommendations from the Ivy documentation.
I also implemented an ivy.Container instance method for exists that returns an ivy.Container detailing if any of the leaves are None.
Related Issue
This should resolve issue #22937 for reformatting exists.
Checklist
Checklist provided by docs