DOC: Minor tweak to advanced indexing example in tutorial #1550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I just wanted to make a very minor suggestion I had while reading through the tutorial (which is very nice, thank you for that!):
In the advanced indexing section, the array used in the 1D examples is
np.arange(10)
. This means that the indices and corresponding values are the same. There's nothing wrong with this of course, but I thought the example might be more immediately grokkable if a different example array were used where the values were different than the indices. I arbitrarily chosenp.arange(10) ** 2
, but any other choice would be equally valid. This is of course a very minor point and pretty subjective, so please feel free to ignore!I also added two other minor commits that popped up while running through the contributor guide to make the PR:
virtualenv
was referenced, but the example uses the built-invenv
module, so I removed it, andAgain - nothing major; please feel free to ignore/cherry-pick as you see fit!