Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 2 commits into from
Sep 26, 2022
Merged

DOC: Add copyto example #22292

merged 2 commits into from
Sep 26, 2022

Conversation

dg3192
Copy link
Contributor

@dg3192 dg3192 commented Sep 16, 2022

No description provided.

Comment on lines 1115 to 1116
>>> np.copyto(A,B)
A
Copy link
Member

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:

Suggested change
>>> np.copyto(A,B)
A
>>> np.copyto(A, B)
>>> A

Examples
--------
>>> A = np.array([4,5,6])
>>> B = [1,2,3]
Copy link
Member

@bsipocz bsipocz Sep 16, 2022

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:

Suggested change
>>> B = [1,2,3]
>>> B = [1, 2, 3]

@seberg
Copy link
Member

seberg commented Sep 19, 2022

@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.

@dg3192
Copy link
Contributor Author

dg3192 commented Sep 19, 2022

@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?
Screen Shot 2022-09-19 at 11 39 07 AM

@seberg
Copy link
Member

seberg commented Sep 20, 2022

@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?

@dg3192
Copy link
Contributor Author

dg3192 commented Sep 21, 2022

@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
Screen Shot 2022-09-21 at 2 03 58 PM

@seberg
Copy link
Member

seberg commented Sep 21, 2022

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 -f, git push -f. That is a "forced" push which will throw away any changes on github that are not also on your computer already.

@dg3192
Copy link
Contributor Author

dg3192 commented Sep 21, 2022

Ahh, my laptop got restarted yesterday and I think that's why this issue. I tried forced push as well but this is what I am getting.
Screen Shot 2022-09-21 at 2 49 17 PM

@seberg
Copy link
Member

seberg commented Sep 22, 2022

Try combining the --set-upstream with the -f :).

@dg3192
Copy link
Contributor Author

dg3192 commented Sep 22, 2022

@seberg I've forced push the changes. Is there anything else I should do from my end?

@seberg
Copy link
Member

seberg commented Sep 26, 2022

Thanks @dg3192! Nothing more to do, one indent was a bit strange in the output, but I just fixed it.

@seberg seberg merged commit cf2b314 into numpy:main Sep 26, 2022
@dg3192
Copy link
Contributor Author

dg3192 commented Sep 26, 2022

Thank you!

@InessaPawson
Copy link
Member

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
Also, consider joining our mailing list. This is a great way to connect with other cool people in our community and be part of important conversations that affect the development of NumPy: https://mail.python.org/mailman/listinfo/numpy-discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants