{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/8324","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/8324/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/8324/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/8324/events","html_url":"https://github.com/numpy/numpy/issues/8324","id":191965357,"number":8324,"title":"numpy.packbits does not always return a uint8 array","user":{"login":"iwiwi","id":469803,"avatar_url":"https://avatars.githubusercontent.com/u/469803?v=3","gravatar_id":"","url":"https://api.github.com/users/iwiwi","html_url":"https://github.com/iwiwi","followers_url":"https://api.github.com/users/iwiwi/followers","following_url":"https://api.github.com/users/iwiwi/following{/other_user}","gists_url":"https://api.github.com/users/iwiwi/gists{/gist_id}","starred_url":"https://api.github.com/users/iwiwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwiwi/subscriptions","organizations_url":"https://api.github.com/users/iwiwi/orgs","repos_url":"https://api.github.com/users/iwiwi/repos","events_url":"https://api.github.com/users/iwiwi/events{/privacy}","received_events_url":"https://api.github.com/users/iwiwi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-28T10:10:31Z","updated_at":"2016-12-03T21:51:25Z","closed_at":"2016-12-03T21:51:25Z","body":"The document states that `numpy.packbits` returns a `uint8` array. However, when an empty array is given, the `dtype` of the returned array is not `uint8`, but is the same as that of the input array.\r\n\r\nI think this is because function `pack_bits` in `core/src/multiarray/compiled_base.c` just copies the input array when the input array is empty. (https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/compiled_base.c#L1555)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/469803/20664179/6dbe62e0-b59d-11e6-8790-34e1a1cd2b2c.png)\r\n\r\nI confirmed this issue on NumPy 1.11.2."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/264667945","html_url":"https://github.com/numpy/numpy/issues/8324#issuecomment-264667945","issue_url":"https://api.github.com/repos/numpy/numpy/issues/8324","id":264667945,"user":{"login":"charris","id":77272,"avatar_url":"https://avatars.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"created_at":"2016-12-03T21:51:25Z","updated_at":"2016-12-03T21:51:25Z","body":"Fixed by #8327."}}
{"actor":{"display_login":"charris"}}