{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/5777","labels_url":"https://api.github.com/repos/numpy/numpy/issues/5777/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/5777/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/5777/events","html_url":"https://github.com/numpy/numpy/issues/5777","id":69814637,"number":5777,"title":"Discrepancy in numpy.round depending on output type","user":{"login":"pitrou","id":1721820,"avatar_url":"https://avatars.githubusercontent.com/u/1721820?v=3","gravatar_id":"","url":"https://api.github.com/users/pitrou","html_url":"https://github.com/pitrou","followers_url":"https://api.github.com/users/pitrou/followers","following_url":"https://api.github.com/users/pitrou/following{/other_user}","gists_url":"https://api.github.com/users/pitrou/gists{/gist_id}","starred_url":"https://api.github.com/users/pitrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitrou/subscriptions","organizations_url":"https://api.github.com/users/pitrou/orgs","repos_url":"https://api.github.com/users/pitrou/repos","events_url":"https://api.github.com/users/pitrou/events{/privacy}","received_events_url":"https://api.github.com/users/pitrou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-21T11:09:51Z","updated_at":"2015-04-21T15:59:03Z","closed_at":null,"body":"When the exact result is representable in the output type, there shouldn't be any error such in the int32 case below:\r\n\r\n```\r\n>>> arr = np.array([-3.0, -2.5, -2.35, -1.5, 1.5, 2.45, 2.5, 2.55]) * 10\r\n>>> out = np.zeros_like(arr)\r\n>>> np.round(arr, -1, out=out)\r\narray([-30., -20., -20., -20.,  20.,  20.,  20.,  30.])\r\n>>> out = np.zeros_like(arr).astype(np.int32)\r\n>>> np.round(arr, -1, out=out)\r\narray([-30, -20, -20, -10,  10,  20,  20,  20], dtype=int32)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/94852246","html_url":"https://github.com/numpy/numpy/issues/5777#issuecomment-94852246","issue_url":"https://api.github.com/repos/numpy/numpy/issues/5777","id":94852246,"user":{"login":"pitrou","id":1721820,"avatar_url":"https://avatars.githubusercontent.com/u/1721820?v=3","gravatar_id":"","url":"https://api.github.com/users/pitrou","html_url":"https://github.com/pitrou","followers_url":"https://api.github.com/users/pitrou/followers","following_url":"https://api.github.com/users/pitrou/following{/other_user}","gists_url":"https://api.github.com/users/pitrou/gists{/gist_id}","starred_url":"https://api.github.com/users/pitrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitrou/subscriptions","organizations_url":"https://api.github.com/users/pitrou/orgs","repos_url":"https://api.github.com/users/pitrou/repos","events_url":"https://api.github.com/users/pitrou/events{/privacy}","received_events_url":"https://api.github.com/users/pitrou/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T15:59:03Z","updated_at":"2015-04-21T15:59:03Z","body":"1.9.2 here."}}