-
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
adding putmask and its test #18972
adding putmask and its test #18972
Conversation
Thanks for the contribution @ShreyanshBardia 🙂 . Can you fix the failing test for paddle backend? |
ivy-gardener |
@bipinKrishnan surely will run precommit beforehand. As for the paddle test case, I am not sure if that is being caused by my PR. A similar test case was failing for #18334, but it appears to be unrelated to the PR. Can you confirm if this is the same case, if not I'll make the required changes. |
Hi @bipinKrishnan can you check this once |
return | ||
if values.size != a.size: | ||
values = np_frontend.resize(values, a.shape) | ||
a[mask] = values[mask] |
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.
I think you forgot the return
for this function
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.
According to the documentation, the function doesn't return anything rather changes the array in place. Here is the relevant link
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. |
Hi @bipinKrishnan, could you please take a look at this. |
Hey @ShreyanshBardia , can you fix the failing the test for the function you added, currently failing for the paddle backend |
Hi @bipinKrishnan, as I mentioned earlier I think the failure is unrelated to the PR, a similar test was failing here #18334 (review) which turned out to be unrelated. Would be glad if you could confirm that |
Ok, let me check this |
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. |
Hi @bipinKrishnan, can you take a look at the PR now, I have updated the branch and also updates the test function, since putmask doesn't return anything and changed inplace it is better to test it directly using |
@bipinKrishnan It seems an old docker image is being used to test and since I updated my branch, a new dependency that was recently added |
It would be great if you could configure pre-commit in your system to avoid lint test fails. Thanks! |
ivy-gardener |
The team is looking into this issue, let's see how the testing goes once this is fixed. Thanks! |
Hey @ShreyanshBardia , the issue with |
Hi, I do have pre-commit configured but I guess this might have been caused when I was resolving merge conflicts using web browser. Apologies for that. It looks like tests ran and were successful can you check @bipinKrishnan |
@@ -31,6 +31,15 @@ def fill_diagonal(a, val, wrap=False): | |||
a = ivy.reshape(temp, shape) | |||
|
|||
|
|||
@to_ivy_arrays_and_back | |||
def putmask(a, mask, values, /): |
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 could remove the /
as it doesn't make sense because there are no kwargs after that
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.
Oh correct, thanks for catching this, I have updated it correctly now @bipinKrishnan
ivy-gardener |
@bipinKrishnan can you take a look |
closes #18359