{"action":"opened","issue":{"url":"https://api.github.com/repos/libdynd/libdynd/issues/1095","repository_url":"https://api.github.com/repos/libdynd/libdynd","labels_url":"https://api.github.com/repos/libdynd/libdynd/issues/1095/labels{/name}","comments_url":"https://api.github.com/repos/libdynd/libdynd/issues/1095/comments","events_url":"https://api.github.com/repos/libdynd/libdynd/issues/1095/events","html_url":"https://github.com/libdynd/libdynd/issues/1095","id":144588823,"number":1095,"title":"bytes_type: data_alignment/target_alignment","user":{"login":"skrah","id":16530421,"avatar_url":"https://avatars.githubusercontent.com/u/16530421?v=3","gravatar_id":"","url":"https://api.github.com/users/skrah","html_url":"https://github.com/skrah","followers_url":"https://api.github.com/users/skrah/followers","following_url":"https://api.github.com/users/skrah/following{/other_user}","gists_url":"https://api.github.com/users/skrah/gists{/gist_id}","starred_url":"https://api.github.com/users/skrah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skrah/subscriptions","organizations_url":"https://api.github.com/users/skrah/orgs","repos_url":"https://api.github.com/users/skrah/repos","events_url":"https://api.github.com/users/skrah/events{/privacy}","received_events_url":"https://api.github.com/users/skrah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-30T13:16:27Z","updated_at":"2016-03-30T13:16:27Z","closed_at":null,"body":"\r\nIn the bytes[] type constructor \"align\" refers to the target alignment:\r\n\r\n```\r\n>>> t = ndt.type(\"bytes[align=16]\")\r\n>>> t.target_alignment\r\n16\r\n>>> t.data_alignment\r\n8\r\n```\r\n\r\nIn fixed_bytes, it refers to the data_alignment:\r\n\r\n>>> t = ndt.type(\"fixed_bytes[1600, align=16]\")\r\n>>> t.data_alignment\r\n16\r\n\r\n\r\nAdditionally, in bytes[] the target_alignment can be smaller than the data_alignment:\r\n>>> t = ndt.type(\"bytes[align=2]\")\r\n>>> t.data_alignment\r\n8\r\n>>> t.target_alignment\r\n2\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}