{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/6248","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/6248/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/6248/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/6248/events","html_url":"https://github.com/numpy/numpy/issues/6248","id":103202638,"number":6248,"title":"Implement __round__ specialmethod for ndarrays?","user":{"login":"anntzer","id":1322974,"avatar_url":"https://avatars.githubusercontent.com/u/1322974?v=3","gravatar_id":"","url":"https://api.github.com/users/anntzer","html_url":"https://github.com/anntzer","followers_url":"https://api.github.com/users/anntzer/followers","following_url":"https://api.github.com/users/anntzer/following{/other_user}","gists_url":"https://api.github.com/users/anntzer/gists{/gist_id}","starred_url":"https://api.github.com/users/anntzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anntzer/subscriptions","organizations_url":"https://api.github.com/users/anntzer/orgs","repos_url":"https://api.github.com/users/anntzer/repos","events_url":"https://api.github.com/users/anntzer/events{/privacy}","received_events_url":"https://api.github.com/users/anntzer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-26T07:56:16Z","updated_at":"2016-02-16T22:12:59Z","closed_at":null,"body":"This would allow calling `round(array)`.  While this would certainly be equivalent to `np.round(array)`, a similar feature is already there with `abs(array)` (which calls `__abs__`) and `np.abs(array)`."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/184896644","html_url":"https://github.com/numpy/numpy/issues/6248#issuecomment-184896644","issue_url":"https://api.github.com/repos/numpy/numpy/issues/6248","id":184896644,"user":{"login":"anntzer","id":1322974,"avatar_url":"https://avatars.githubusercontent.com/u/1322974?v=3","gravatar_id":"","url":"https://api.github.com/users/anntzer","html_url":"https://github.com/anntzer","followers_url":"https://api.github.com/users/anntzer/followers","following_url":"https://api.github.com/users/anntzer/following{/other_user}","gists_url":"https://api.github.com/users/anntzer/gists{/gist_id}","starred_url":"https://api.github.com/users/anntzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anntzer/subscriptions","organizations_url":"https://api.github.com/users/anntzer/orgs","repos_url":"https://api.github.com/users/anntzer/repos","events_url":"https://api.github.com/users/anntzer/events{/privacy}","received_events_url":"https://api.github.com/users/anntzer/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T22:12:59Z","updated_at":"2016-02-16T22:12:59Z","body":"I don't really think unsafe casting is a problem, or at least CPython decided it wasn't a problem:\r\n```\r\nIn [1]: round(1e308)\r\nOut[1]: 100000000000000001097906362944045541740492309677311846336810682903157585404911491537163328978494688899061249669721172515611590283743140088328307009198146046031271664502933027185697489699588559043338384466165001178426897626212945177628091195786707458122783970171784415105291802893207873272974885715430223118336\r\n```\r\nEspecially given that numpy now tries to enforce using ints rather than floats as indices, I think returning integers when applicable should be preferred."}}