-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Indexing style leads to different output #16552
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
Comments
Can you say where the documentation is wrong or could be clarified. The case you are showing is explained in this section: https://numpy.org/devdocs/user/basics.indexing.html#indexing-multi-dimensional-arrays and while I am sure it can be improved it seems correct on first glance. |
An example of the the case I presented can't be found at the indexing page. So using an index for array A like A[x][y] or A[x,y] should lead to the same output according to the documentation. Which is the case for a 1 dimensional input. But the code I presented shows a different thing. The 2 print statements actually differin output!. So one of the two things is the case: |
The documentation you refer to is under the heading |
That doesn't change anything, even in the paragraph of multidimensional array indexing this issue/phenomenon doesn't appear. |
There is an important distinction between two different kinds of indexing behavior that are both accessed with the |
I'm going to go ahead and close this for now - any ideas related to specific improvements to the indexing documentation are more than welcome! |
These two print statements give different outputs. In the numpy indexing document it states that the operations in the two print statements are the same.
Link of document: https://numpy.org/devdocs/user/basics.indexing.html
Numpy/Python version information:
1.18.1 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
The text was updated successfully, but these errors were encountered: