{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/7309","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/7309/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/7309/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/7309/events","html_url":"https://github.com/numpy/numpy/issues/7309","id":135510420,"number":7309,"title":"Assigning to an out-of-bounds range should fail (but doesn't)","user":{"login":"j6k4m8","id":693511,"avatar_url":"https://avatars.githubusercontent.com/u/693511?v=3","gravatar_id":"","url":"https://api.github.com/users/j6k4m8","html_url":"https://github.com/j6k4m8","followers_url":"https://api.github.com/users/j6k4m8/followers","following_url":"https://api.github.com/users/j6k4m8/following{/other_user}","gists_url":"https://api.github.com/users/j6k4m8/gists{/gist_id}","starred_url":"https://api.github.com/users/j6k4m8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j6k4m8/subscriptions","organizations_url":"https://api.github.com/users/j6k4m8/orgs","repos_url":"https://api.github.com/users/j6k4m8/repos","events_url":"https://api.github.com/users/j6k4m8/events{/privacy}","received_events_url":"https://api.github.com/users/j6k4m8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-22T19:05:18Z","updated_at":"2016-02-22T19:13:13Z","closed_at":null,"body":"Consider the following (py 2.7) code:\r\n\r\n```python\r\n>>> n = numpy.zeros((100, 100, 100))\r\n>>> n[200:201, 200:201, 200:201] = [[[1, 1, 1]]]\r\n```\r\n\r\nThis neither fails nor warns. It's possible that this is intentional numpy behavior, but it's *very* unclear to me why.\r\n\r\nResulting `n.shape` is still `(100, 100, 100)`.\r\n\r\n- **Expected behavior:** Assigning to an out-of-bounds subarray fails with an `IndexError`.\r\n- **Actual behavior:** Silent failure, array is unchanged."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/187325633","html_url":"https://github.com/numpy/numpy/issues/7309#issuecomment-187325633","issue_url":"https://api.github.com/repos/numpy/numpy/issues/7309","id":187325633,"user":{"login":"seberg","id":61977,"avatar_url":"https://avatars.githubusercontent.com/u/61977?v=3","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":"2016-02-22T19:13:13Z","updated_at":"2016-02-22T19:13:13Z","body":"Sorry, a bit short on explanations right now, but note that `[1, 2, 3, 4][10:34] == []`. And you can assign a full array to an empty one (as long as it can be broadcast). This case strictly speaking cannot be broadcast, so I think it is a bug to accept it."}}