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

Skip to content

DOC: Added a section in the 'Iterating over arrays' doc page on basic iteration. #16760

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 3 commits into from
Jul 10, 2020

Conversation

dpitch40
Copy link
Contributor

@dpitch40 dpitch40 commented Jul 6, 2020

It seems strange that basic iteration over arrays is covered only in the Quickstart Tutorial and not mentioned in the reference doc page titled "Iterating Over Arrays". I normally only use the reference section and spent about ten minutes trying to remind myself of how basic iteration works/wondering if it had been removed in an update. This pull request adds a section on basic iteration and moves everything that was there down one header level.

@rossbar
Copy link
Contributor

rossbar commented Jul 6, 2020

Instead of explicitly duplicating "basic" iteration examples in the reference guide, how about linking to the relevant section of the tutorial instead? The advantage to such an approach is that it prevents fragmentation of the documentation, which can make things both hard to find for users and harder to maintain (see e.g. #14038)

Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think going through and changing all of the heading styles makes this a more intrusive change than it needs to be. Rather than introducing a new heading, maybe the blurb you've added about "basic iteration" could be included as a .. note (or similar directive) at the top of the file?

…o the quickstart documentation section on basic iteration
@dpitch40 dpitch40 force-pushed the basic_iteration_documentation branch from b1c2fa0 to 4de4f33 Compare July 8, 2020 03:16
Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sticking with this @dpitch40 , this is definitely an improvement IMO. I think you're right that the original document did not provide enough context and would be very confusing for newcomers who happened to stumble on this page looking for more basic usage/examples.

I've left a couple wording suggestions that you can feel free to use/ignore as you see fit (I think your original wording is fine) and took the liberty of pushing a minor rST-formatting nit to your branch.

Improve wording

Co-authored-by: Ross Barnowski <[email protected]>
Copy link
Member

@melissawm melissawm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, thank you @dpitch40 !

@melissawm melissawm merged commit a724ce8 into numpy:master Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants