{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/11378","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/11378/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/11378/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/11378/events","html_url":"https://github.com/numpy/numpy/issues/11378","id":333568032,"node_id":"MDU6SXNzdWUzMzM1NjgwMzI=","number":11378,"title":"BUG: Wrong axis number in error message","user":{"login":"mdickinson","id":662003,"node_id":"MDQ6VXNlcjY2MjAwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/662003?v=4","gravatar_id":"","url":"https://api.github.com/users/mdickinson","html_url":"https://github.com/mdickinson","followers_url":"https://api.github.com/users/mdickinson/followers","following_url":"https://api.github.com/users/mdickinson/following{/other_user}","gists_url":"https://api.github.com/users/mdickinson/gists{/gist_id}","starred_url":"https://api.github.com/users/mdickinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdickinson/subscriptions","organizations_url":"https://api.github.com/users/mdickinson/orgs","repos_url":"https://api.github.com/users/mdickinson/repos","events_url":"https://api.github.com/users/mdickinson/events{/privacy}","received_events_url":"https://api.github.com/users/mdickinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-19T08:26:18Z","updated_at":"2018-06-19T09:39:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I'm seeing a confusing error message when doing fancy indexing on a 1d NumPy array. The error message is \"index 10 is out of bounds for axis 1 with size 5\", but the array in question is 1d, so only has a single axis. I would have expected \"index 10 is out of bounds for axis 0 with size 5\". See the interpreter session below (NumPy master branch at 717840c91029ac0680110838eec0103d23ccb32c; Python 3.6.5; macOS 10.13.5). I can also reproduce on NumPy 1.14.5/Python 3.6.5 and NumPy 1.13.3/Python 2.7.13.\r\n\r\n```python\r\ntaniyama:numpy mdickinson$ python\r\nPython 3.6.5 (default, Mar 29 2018, 15:37:32) \r\n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import numpy as np\r\n>>> np\r\n<module 'numpy' from '/Users/mdickinson/Desktop/numpy/numpy/__init__.py'>\r\n>>> np.arange(5)\r\narray([0, 1, 2, 3, 4])\r\n>>> np.arange(5)[[0, 1, 10]]\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nIndexError: index 10 is out of bounds for axis 1 with size 5\r\n```"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/398338976","html_url":"https://github.com/numpy/numpy/issues/11378#issuecomment-398338976","issue_url":"https://api.github.com/repos/numpy/numpy/issues/11378","id":398338976,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODMzODk3Ng==","user":{"login":"seberg","id":61977,"node_id":"MDQ6VXNlcjYxOTc3","avatar_url":"https://avatars1.githubusercontent.com/u/61977?v=4","gravatar_id":"","url":"https://api.github.com/users/seberg","html_url":"https://github.com/seberg","followers_url":"https://api.github.com/users/seberg/followers","following_url":"https://api.github.com/users/seberg/following{/other_user}","gists_url":"https://api.github.com/users/seberg/gists{/gist_id}","starred_url":"https://api.github.com/users/seberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seberg/subscriptions","organizations_url":"https://api.github.com/users/seberg/orgs","repos_url":"https://api.github.com/users/seberg/repos","events_url":"https://api.github.com/users/seberg/events{/privacy}","received_events_url":"https://api.github.com/users/seberg/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T09:39:15Z","updated_at":"2018-06-19T09:39:15Z","author_association":"MEMBER","body":"Jupp: https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/lowlevel_strided_loops.c.src#L1440\r\nThat says 1, not 0."}}
{"actor":{"display_login":"seberg"}}