{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/12358","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/12358/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/12358/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/12358/events","html_url":"https://github.com/numpy/numpy/pull/12358","id":379357299,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5ODQ3NDMy","number":12358,"title":"BUG: test, fix loading structured dtypes with padding","user":{"login":"mattip","id":823911,"node_id":"MDQ6VXNlcjgyMzkxMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/823911?v=4","gravatar_id":"","url":"https://api.github.com/users/mattip","html_url":"https://github.com/mattip","followers_url":"https://api.github.com/users/mattip/followers","following_url":"https://api.github.com/users/mattip/following{/other_user}","gists_url":"https://api.github.com/users/mattip/gists{/gist_id}","starred_url":"https://api.github.com/users/mattip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattip/subscriptions","organizations_url":"https://api.github.com/users/mattip/orgs","repos_url":"https://api.github.com/users/mattip/repos","events_url":"https://api.github.com/users/mattip/events{/privacy}","received_events_url":"https://api.github.com/users/mattip/received_events","type":"User","site_admin":false},"labels":[{"id":6359214,"node_id":"MDU6TGFiZWw2MzU5MjE0","url":"https://api.github.com/repos/numpy/numpy/labels/00%20-%20Bug","name":"00 - Bug","color":"fef2c0","default":false},{"id":16917082,"node_id":"MDU6TGFiZWwxNjkxNzA4Mg==","url":"https://api.github.com/repos/numpy/numpy/labels/component:%20numpy.lib","name":"component: numpy.lib","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/numpy/numpy/milestones/58","html_url":"https://github.com/numpy/numpy/milestone/58","labels_url":"https://api.github.com/repos/numpy/numpy/milestones/58/labels","id":3353003,"node_id":"MDk6TWlsZXN0b25lMzM1MzAwMw==","number":58,"title":"1.16.0 release","description":"","creator":{"login":"charris","id":77272,"node_id":"MDQ6VXNlcjc3Mjcy","avatar_url":"https://avatars3.githubusercontent.com/u/77272?v=4","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},"open_issues":37,"closed_issues":52,"state":"open","created_at":"2018-05-16T21:13:27Z","updated_at":"2018-11-12T23:17:25Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-11-09T23:28:50Z","updated_at":"2018-11-12T23:38:51Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/12358","html_url":"https://github.com/numpy/numpy/pull/12358","diff_url":"https://github.com/numpy/numpy/pull/12358.diff","patch_url":"https://github.com/numpy/numpy/pull/12358.patch"},"body":"Replaces PR #10931 which it draws heavily from. Fixes #2215. \r\n\r\nThe original PR has a discussion of why this is not the best fix, it assumes a field `('', |Vn)` - where `n` is the void size - is a padding field when someone could theoretically be using such a field for data. It also will force a possibly aligned dtype to now be not aligned, but unfortunately that information is not preserved in the storage format. \r\n\r\nI think this is the least evil of the possibilities, although we could consider saving the padding fields with a unique name. It would have to be better than the existing choice: `f1`, `f2`, ... which in the original issue clashed with names commonly used by users"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/438071243","html_url":"https://github.com/numpy/numpy/pull/12358#issuecomment-438071243","issue_url":"https://api.github.com/repos/numpy/numpy/issues/12358","id":438071243,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODA3MTI0Mw==","user":{"login":"mattip","id":823911,"node_id":"MDQ6VXNlcjgyMzkxMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/823911?v=4","gravatar_id":"","url":"https://api.github.com/users/mattip","html_url":"https://github.com/mattip","followers_url":"https://api.github.com/users/mattip/followers","following_url":"https://api.github.com/users/mattip/following{/other_user}","gists_url":"https://api.github.com/users/mattip/gists{/gist_id}","starred_url":"https://api.github.com/users/mattip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattip/subscriptions","organizations_url":"https://api.github.com/users/mattip/orgs","repos_url":"https://api.github.com/users/mattip/repos","events_url":"https://api.github.com/users/mattip/events{/privacy}","received_events_url":"https://api.github.com/users/mattip/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T23:38:51Z","updated_at":"2018-11-12T23:38:51Z","author_association":"MEMBER","body":"@ahaldane your function does seem to be simpler. It **does** handle empty names as long as they are not a void type, but I have added the deprecation since it is confusing to have blank fields on purpose.\r\n\r\nAs for `alignement=True` I think we should punt on that for now, as we have never been able to round-trip the attribute so we are not breaking backward compatibility here. Calculating it on the fly would force non-aligned dtypes that happen to specify an aligned dtype using offsets to be aligned after round-tripping. I think it must be part of the storage protocol. One solution would be to use `str(dtype)` rather than `dtype.descr` but that should be a separate PR."}}
{"actor":{"display_login":"mattip"}}