{"action":"closed","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/7924","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/7924/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/7924/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/7924/events","html_url":"https://github.com/numpy/numpy/issues/7924","id":170300314,"number":7924,"title":"iscomplexobj does not work for sparse matrices","user":{"login":"goerz","id":112306,"avatar_url":"https://avatars.githubusercontent.com/u/112306?v=3","gravatar_id":"","url":"https://api.github.com/users/goerz","html_url":"https://github.com/goerz","followers_url":"https://api.github.com/users/goerz/followers","following_url":"https://api.github.com/users/goerz/following{/other_user}","gists_url":"https://api.github.com/users/goerz/gists{/gist_id}","starred_url":"https://api.github.com/users/goerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goerz/subscriptions","organizations_url":"https://api.github.com/users/goerz/orgs","repos_url":"https://api.github.com/users/goerz/repos","events_url":"https://api.github.com/users/goerz/events{/privacy}","received_events_url":"https://api.github.com/users/goerz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-10T00:10:11Z","updated_at":"2016-08-17T15:49:49Z","closed_at":"2016-08-17T15:49:49Z","body":"    >>> import scipy\r\n    >>> import numpy as np\r\n    >>> A = scipy.sparse.csr_matrix([[1, 2, 0], [0, 0, 3], [4, 0, 5j]])\r\n    >>> np.iscomplexobj(A)\r\n    False\r\n\r\nI would argue that the implementation of `iscomplexobj` should not include the `asarray`, but should simply read\r\n\r\n    return issubclass(x.dtype.type, _nx.complexfloating)\r\n\r\nThis might cause an `AttributeError`, of course. Not sure whether it's better to throw the exception at this point, or whether to handle it locally."}}
{"actor":{"display_login":"shoyer"}}