{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/7165","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/7165/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/7165/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/7165/events","html_url":"https://github.com/numpy/numpy/issues/7165","id":130496623,"number":7165,"title":"np.unravel_index() does not accept empty inputs","user":{"login":"WeatherGod","id":291576,"avatar_url":"https://avatars.githubusercontent.com/u/291576?v=3","gravatar_id":"","url":"https://api.github.com/users/WeatherGod","html_url":"https://github.com/WeatherGod","followers_url":"https://api.github.com/users/WeatherGod/followers","following_url":"https://api.github.com/users/WeatherGod/following{/other_user}","gists_url":"https://api.github.com/users/WeatherGod/gists{/gist_id}","starred_url":"https://api.github.com/users/WeatherGod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeatherGod/subscriptions","organizations_url":"https://api.github.com/users/WeatherGod/orgs","repos_url":"https://api.github.com/users/WeatherGod/repos","events_url":"https://api.github.com/users/WeatherGod/events{/privacy}","received_events_url":"https://api.github.com/users/WeatherGod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-01T21:55:39Z","updated_at":"2016-02-02T16:19:12Z","closed_at":null,"body":"I would expect a tuple of empty outputs back. I get the following:\r\n```\r\n>>> np.unravel_index([], (10, 12))\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: Iterator operand 0 dtype could not be cast from dtype('float64') to dtype('int64') according to the rule 'same_kind'\r\n```\r\nThis does not seem to be a regression, as I can see this with numpy v1.9.2, but it does seem silly."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/178665778","html_url":"https://github.com/numpy/numpy/issues/7165#issuecomment-178665778","issue_url":"https://api.github.com/repos/numpy/numpy/issues/7165","id":178665778,"user":{"login":"njsmith","id":609896,"avatar_url":"https://avatars.githubusercontent.com/u/609896?v=3","gravatar_id":"","url":"https://api.github.com/users/njsmith","html_url":"https://github.com/njsmith","followers_url":"https://api.github.com/users/njsmith/followers","following_url":"https://api.github.com/users/njsmith/following{/other_user}","gists_url":"https://api.github.com/users/njsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/njsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njsmith/subscriptions","organizations_url":"https://api.github.com/users/njsmith/orgs","repos_url":"https://api.github.com/users/njsmith/repos","events_url":"https://api.github.com/users/njsmith/events{/privacy}","received_events_url":"https://api.github.com/users/njsmith/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T16:19:12Z","updated_at":"2016-02-02T16:19:12Z","body":"@seberg: the nice thing is that we even have a special type for indices\n(intp), so if someone wants a 64 bit index on a 32 bit system we can just\npoint to the name of the type :-)\nOn Feb 2, 2016 8:00 AM, \"Jaime\" <notifications@github.com> wrote:\n\n> May not be worth it, but that's one of the sweetnesses of the new iterator.\n>\n> What seems ludicrous is that we have specialized branches and functions\n> for C and Fortran order... There's a PR with a net negative line count of\n> ~70 lines waiting there...\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/numpy/numpy/issues/7165#issuecomment-178653513>.\n>\n"}}