{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/12374","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/12374/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/12374/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/12374/events","html_url":"https://github.com/numpy/numpy/issues/12374","id":380241937,"node_id":"MDU6SXNzdWUzODAyNDE5Mzc=","number":12374,"title":"Excessive cpu usage for np.unique","user":{"login":"jimmyyhwu","id":6546428,"node_id":"MDQ6VXNlcjY1NDY0Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/6546428?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmyyhwu","html_url":"https://github.com/jimmyyhwu","followers_url":"https://api.github.com/users/jimmyyhwu/followers","following_url":"https://api.github.com/users/jimmyyhwu/following{/other_user}","gists_url":"https://api.github.com/users/jimmyyhwu/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyyhwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyyhwu/subscriptions","organizations_url":"https://api.github.com/users/jimmyyhwu/orgs","repos_url":"https://api.github.com/users/jimmyyhwu/repos","events_url":"https://api.github.com/users/jimmyyhwu/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyyhwu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-13T14:05:54Z","updated_at":"2018-11-13T14:57:30Z","closed_at":null,"author_association":"NONE","body":"Calling np.unique seems to result in > 100% cpu usage (no multiprocessing).\r\n\r\n### Reproducing code example:\r\n\r\n```python\r\nimport numpy as np\r\n\r\nfor _ in range(1000):\r\n    arr = np.zeros((1024, 6144), dtype=np.uint16)\r\n    np.unique(arr)\r\n```\r\n\r\n### Error message:\r\n\r\nhtop shows ~3600% CPU usage.\r\n\r\n### Numpy/Python version information:\r\n\r\n1.15.3 3.6.6 |Anaconda, Inc.| (default, Oct  9 2018, 12:34:16) \r\n[GCC 7.3.0]\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/438295328","html_url":"https://github.com/numpy/numpy/issues/12374#issuecomment-438295328","issue_url":"https://api.github.com/repos/numpy/numpy/issues/12374","id":438295328,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODI5NTMyOA==","user":{"login":"jimmyyhwu","id":6546428,"node_id":"MDQ6VXNlcjY1NDY0Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/6546428?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmyyhwu","html_url":"https://github.com/jimmyyhwu","followers_url":"https://api.github.com/users/jimmyyhwu/followers","following_url":"https://api.github.com/users/jimmyyhwu/following{/other_user}","gists_url":"https://api.github.com/users/jimmyyhwu/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyyhwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyyhwu/subscriptions","organizations_url":"https://api.github.com/users/jimmyyhwu/orgs","repos_url":"https://api.github.com/users/jimmyyhwu/repos","events_url":"https://api.github.com/users/jimmyyhwu/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyyhwu/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T14:57:30Z","updated_at":"2018-11-13T14:57:30Z","author_association":"NONE","body":"Yes, for the numpy installed via conda, setting `OMP_NUM_THREADS=1` indeed makes the issue go away."}}
{"actor":{"display_login":"jimmyyhwu"}}