{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/8952","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/8952/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/8952/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/8952/events","html_url":"https://github.com/numpy/numpy/pull/8952","id":222035790,"number":8952,"title":"MAINT: Removed duplicated code around `ufunc->identity`","user":{"login":"eric-wieser","id":425260,"avatar_url":"https://avatars3.githubusercontent.com/u/425260?v=4","gravatar_id":"","url":"https://api.github.com/users/eric-wieser","html_url":"https://github.com/eric-wieser","followers_url":"https://api.github.com/users/eric-wieser/followers","following_url":"https://api.github.com/users/eric-wieser/following{/other_user}","gists_url":"https://api.github.com/users/eric-wieser/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-wieser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-wieser/subscriptions","organizations_url":"https://api.github.com/users/eric-wieser/orgs","repos_url":"https://api.github.com/users/eric-wieser/repos","events_url":"https://api.github.com/users/eric-wieser/events{/privacy}","received_events_url":"https://api.github.com/users/eric-wieser/received_events","type":"User","site_admin":false},"labels":[{"id":36825825,"url":"https://api.github.com/repos/numpy/numpy/labels/03%20-%20Maintenance","name":"03 - Maintenance","color":"fef2c0","default":false},{"id":16917029,"url":"https://api.github.com/repos/numpy/numpy/labels/component:%20numpy.core","name":"component: numpy.core","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-04-16T21:54:19Z","updated_at":"2017-12-18T04:08:07Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/8952","html_url":"https://github.com/numpy/numpy/pull/8952","diff_url":"https://github.com/numpy/numpy/pull/8952.diff","patch_url":"https://github.com/numpy/numpy/pull/8952.patch"},"body":"There didn't seem to be any value to a `assign_identity` function - all we\r\nactually care about is the value to assign.\r\n\r\nThis paves the way for:\r\n\r\n* easily adding more values (#7702)\r\n* using the identity in more places (#834)\r\n\r\nThis also fixes #8860 as a side-effect, but introduces a different problem elsewhere:\r\n\r\n* `np.add.reduce(np.array([], object))` - previously `False`, now `0` (good)\r\n* `np.logical_or.reduce(np.array([], object))` - previously `False`, now `0` (not so good)\r\n\r\nThe latter of these is fixed by #8955 which can be merged after this PR.\r\n\r\nThis seems to be better behaviour, since at least `0` is what `np.logical_or.identity` returns. In a future commit, I think we should distinguish between `True` and `1` in the identity, but I don't want to change too much at once, so I'm leaving that for another PR"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/352321209","html_url":"https://github.com/numpy/numpy/pull/8952#issuecomment-352321209","issue_url":"https://api.github.com/repos/numpy/numpy/issues/8952","id":352321209,"user":{"login":"eric-wieser","id":425260,"avatar_url":"https://avatars3.githubusercontent.com/u/425260?v=4","gravatar_id":"","url":"https://api.github.com/users/eric-wieser","html_url":"https://github.com/eric-wieser","followers_url":"https://api.github.com/users/eric-wieser/followers","following_url":"https://api.github.com/users/eric-wieser/following{/other_user}","gists_url":"https://api.github.com/users/eric-wieser/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-wieser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-wieser/subscriptions","organizations_url":"https://api.github.com/users/eric-wieser/orgs","repos_url":"https://api.github.com/users/eric-wieser/repos","events_url":"https://api.github.com/users/eric-wieser/events{/privacy}","received_events_url":"https://api.github.com/users/eric-wieser/received_events","type":"User","site_admin":false},"created_at":"2017-12-18T04:08:07Z","updated_at":"2017-12-18T04:08:07Z","author_association":"MEMBER","body":"@mhvk: looks like there are no objections"}}
{"actor":{"display_login":"eric-wieser"}}