-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: Add copyto example #22292
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
DOC: Add copyto example #22292
Conversation
numpy/core/multiarray.py
Outdated
>>> np.copyto(A,B) | ||
A |
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 need to add the >>>
to the beginning of each and every command lines, which tells the testing infrastructure which ones are the one to run.
Here and below:
>>> np.copyto(A,B) | |
A | |
>>> np.copyto(A, B) | |
>>> A |
numpy/core/multiarray.py
Outdated
Examples | ||
-------- | ||
>>> A = np.array([4,5,6]) | ||
>>> B = [1,2,3] |
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.
Please follow PEP-8 python formatting, in practice for this pull request means to add a space after each coma.
Here and elsewhere in the added example:
>>> B = [1,2,3] | |
>>> B = [1, 2, 3] |
@dg3192 do you have time to follow up on the comments above? Applying the changes is good here, but the same changes need to be fixed in a few more places and Brigitta did not mark each one individually. |
@seberg sure, I updated the example but I am having issues in pushing it back. Could you please help me on how should I do it? |
@dg3192 since you did a force-push, I assume you figured it out? There are still a few whitespace issues (e.g. space after comma missing). Maybe you can try that out? |
@seberg I saved the changes that you highlighted but somehow I am getting error while pushing the changes. Not sure what should be the next step? Attaching error screenshot for your reference |
Maybe you worked on a different computer/setup? The error says that what is on github appears to be newer than what you have locally. That can happen when others push, but nobody else seemed to have pushed). There could be other reasons though. In any case, if you are sure that what you have locally is correct, simply add a |
Try combining the |
@seberg I've forced push the changes. Is there anything else I should do from my end? |
Thanks @dg3192! Nothing more to do, one indent was a bit strange in the output, but I just fixed it. |
Thank you! |
Hi-five on merging your first pull request to NumPy, @dg3192! We hope you stick around! Your choices aren’t limited to programming – you can review pull requests, help us stay on top of new and old issues, develop educational material, work on our website, add or improve graphic design, create marketing materials, translate website content, write grant proposals, and help with other fundraising initiatives. For more info, check out: https://numpy.org/contribute |
No description provided.