{"action":"created","issue":{"url":"https://api.github.com/repos/pybee/voc/issues/497","repository_url":"https://api.github.com/repos/pybee/voc","labels_url":"https://api.github.com/repos/pybee/voc/issues/497/labels{/name}","comments_url":"https://api.github.com/repos/pybee/voc/issues/497/comments","events_url":"https://api.github.com/repos/pybee/voc/issues/497/events","html_url":"https://github.com/pybee/voc/pull/497","id":218155086,"number":497,"title":"[WIP] Fix complex methods to handle (0 + 0j) edge case","user":{"login":"soandrew","id":15936962,"avatar_url":"https://avatars3.githubusercontent.com/u/15936962?v=4","gravatar_id":"","url":"https://api.github.com/users/soandrew","html_url":"https://github.com/soandrew","followers_url":"https://api.github.com/users/soandrew/followers","following_url":"https://api.github.com/users/soandrew/following{/other_user}","gists_url":"https://api.github.com/users/soandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/soandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soandrew/subscriptions","organizations_url":"https://api.github.com/users/soandrew/orgs","repos_url":"https://api.github.com/users/soandrew/repos","events_url":"https://api.github.com/users/soandrew/events{/privacy}","received_events_url":"https://api.github.com/users/soandrew/received_events","type":"User","site_admin":false},"labels":[{"id":386835162,"url":"https://api.github.com/repos/pybee/voc/labels/not-quite-right","name":"not-quite-right","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-30T10:42:27Z","updated_at":"2018-04-25T07:26:40Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pybee/voc/pulls/497","html_url":"https://github.com/pybee/voc/pull/497","diff_url":"https://github.com/pybee/voc/pull/497.diff","patch_url":"https://github.com/pybee/voc/pull/497.patch"},"body":"There was a typo in the helper function `calCPow` of `complex.__pow__` that affected handling of (0 + 0j) base. For example code like the following produced the wrong output.\r\n```\r\nx = 0 + 0j\r\ny = 1 + 0j\r\nprint(x ** y)\r\n```\r\nOutput was `(1+0j)` when it should have been `0j`"},"comment":{"url":"https://api.github.com/repos/pybee/voc/issues/comments/384186865","html_url":"https://github.com/pybee/voc/pull/497#issuecomment-384186865","issue_url":"https://api.github.com/repos/pybee/voc/issues/497","id":384186865,"user":{"login":"soandrew","id":15936962,"avatar_url":"https://avatars3.githubusercontent.com/u/15936962?v=4","gravatar_id":"","url":"https://api.github.com/users/soandrew","html_url":"https://github.com/soandrew","followers_url":"https://api.github.com/users/soandrew/followers","following_url":"https://api.github.com/users/soandrew/following{/other_user}","gists_url":"https://api.github.com/users/soandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/soandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soandrew/subscriptions","organizations_url":"https://api.github.com/users/soandrew/orgs","repos_url":"https://api.github.com/users/soandrew/repos","events_url":"https://api.github.com/users/soandrew/events{/privacy}","received_events_url":"https://api.github.com/users/soandrew/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T07:26:40Z","updated_at":"2018-04-25T07:26:40Z","author_association":"CONTRIBUTOR","body":"@cflee Sorry for the delayed reply. Indeed there still is an issue when `0+0j` is raised to a negative `int` which causes an error message of `complex division by zero` to be thrown instead of the proper `0.0 to a negative or complex power`.\r\n\r\nI made a fix and added explicit tests for the `(0+0j) ** (1+0j)` and `(0+0j) ** -1)` cases which were causing these specific issues."}}
{"actor":{"display_login":"soandrew"}}