-
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
added numpy instance method put #14682
Conversation
Hi, thanks for contributing to Ivy 🤗 Apart from the frontend implementation, can you also implement the accompanying frontend test like described in the Open Tasks Guide? Thank you 🤗 |
@AnjelicaB LGTM, however please comment |
Hi! I'm not sure what you mean by editing the checklist. Do you mean this checklist (#3607)? I already opened an issue on it. There are also some tests that failed. What could have been the bug that caused these failures? |
Ah the docs for |
Frontend Task ChecklistIMPORTANT 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 🗺:
CHECKS 📑:
|
Hello! Could you help me with some of the "SOS" in the checklist? The tests that are failing include: |
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.
Hi @AnjelicaB, sorry I took a long time to reply. I need you to make some changes here, thank you 🤗
@@ -345,6 +345,9 @@ def tolist(self) -> list: | |||
def view(self): | |||
return np_frontend.reshape(self, tuple(self.shape)) | |||
|
|||
def put(a, ind, v, mode="raise"): |
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.
You are adding an instance method, which means the function definition must have a self
argument in order to be used as an instance method, something along the lines of
def put(self, ind, v, mode='raise')
@@ -345,6 +345,9 @@ def tolist(self) -> list: | |||
def view(self): | |||
return np_frontend.reshape(self, tuple(self.shape)) | |||
|
|||
def put(a, ind, v, mode="raise"): | |||
return np_frontend.put(a, ind, v, mode="raise") |
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.
You are attempting to call a frontend method, which is np_frontend.put
. However, this function hasn't been implemented yet in the codebase. Now you either have 2 choices:
- Implement it yourself by creating another PR with this issue Add Matrix methods for Numpy Frontend #1535, which means you'll have to implement
ivy.functional.frontends.numpy.put
first. - Put this PR on hold and wait for someone to implement said function first.
method_input_dtypes=input_dtypes, | ||
init_all_as_kwargs_np={"object": x[0]}, | ||
method_all_as_kwargs_np={"value": x[1:]}, | ||
|
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.
You are missing an enclosing bracket )
, which makes the file syntactically wrong and makes the tests fail.
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. |
This PR has been closed because it has been marked as stale for more than 7 days with no activity. |
Close #14680