{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/8151","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/8151/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/8151/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/8151/events","html_url":"https://github.com/numpy/numpy/issues/8151","id":182620146,"number":8151,"title":"min and max surprising on complex numbers","user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars.githubusercontent.com/u/3019665?v=3","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-12T20:03:22Z","updated_at":"2016-10-12T23:56:46Z","closed_at":null,"body":"If I take the minimum or maximum of complex numbers, I would expect that the magnitude is used. However, I find the real component is used instead. Here is a simple example. My expectation would be max and min are reversed in this case.\r\n\r\n```python\r\nIn [1]: import numpy\r\n\r\nIn [2]: a = numpy.array([1+1j, 1.2])\r\n\r\nIn [3]: numpy.abs(a)\r\nOut[3]: array([ 1.41421356,  1.2       ])\r\n\r\nIn [4]: numpy.real(a)\r\nOut[4]: array([ 1. ,  1.2])\r\n\r\nIn [5]: numpy.min(a)\r\nOut[5]: (1+1j)\r\n\r\nIn [6]: numpy.max(a)\r\nOut[6]: (1.2+0j)\r\n```"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/253373148","html_url":"https://github.com/numpy/numpy/issues/8151#issuecomment-253373148","issue_url":"https://api.github.com/repos/numpy/numpy/issues/8151","id":253373148,"user":{"login":"ahaldane","id":9040124,"avatar_url":"https://avatars.githubusercontent.com/u/9040124?v=3","gravatar_id":"","url":"https://api.github.com/users/ahaldane","html_url":"https://github.com/ahaldane","followers_url":"https://api.github.com/users/ahaldane/followers","following_url":"https://api.github.com/users/ahaldane/following{/other_user}","gists_url":"https://api.github.com/users/ahaldane/gists{/gist_id}","starred_url":"https://api.github.com/users/ahaldane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahaldane/subscriptions","organizations_url":"https://api.github.com/users/ahaldane/orgs","repos_url":"https://api.github.com/users/ahaldane/repos","events_url":"https://api.github.com/users/ahaldane/events{/privacy}","received_events_url":"https://api.github.com/users/ahaldane/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T23:56:46Z","updated_at":"2016-10-12T23:56:46Z","body":"For what it's worth, Matlab uses the magnitude here. Pure-python and julia raise errors."}}
{"actor":{"display_login":"ahaldane"}}