{"action":"created","issue":{"url":"https://api.github.com/repos/dask/dask/issues/4152","repository_url":"https://api.github.com/repos/dask/dask","labels_url":"https://api.github.com/repos/dask/dask/issues/4152/labels{/name}","comments_url":"https://api.github.com/repos/dask/dask/issues/4152/comments","events_url":"https://api.github.com/repos/dask/dask/issues/4152/events","html_url":"https://github.com/dask/dask/pull/4152","id":375296311,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2Nzc0Mjg2","number":4152,"title":"Rewrite Dask Array's `pad` to add only new chunks","user":{"login":"jakirkham","id":3019665,"node_id":"MDQ6VXNlcjMwMTk2NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-30T02:45:51Z","updated_at":"2018-11-03T21:42:19Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/dask/dask/pulls/4152","html_url":"https://github.com/dask/dask/pull/4152","diff_url":"https://github.com/dask/dask/pull/4152.diff","patch_url":"https://github.com/dask/dask/pull/4152.patch"},"body":"Requires PR ( https://github.com/dask/dask/pull/4150 )\r\n\r\nIn nearly all cases Dask Array's `pad` would handle the intended padding in new chunks concatenated around the input array. This is nice as it ensure the original array is passed through unaltered with padding chunks being generated (possibly using the original arrays data) as needed by downstream computations.\r\n\r\nHowever this was not the case for the `constant`, `edge`, and `linear_ramp` modes where NumPy's `pad` was called on the edge chunks instead. This could be bad for a few reasons. First the edge chunks would increase in size based on the padding width in these specific cases. Second NumPy's `pad` appears to have performance penalties (due to temporaries and copying) if these array chunks are quite large. Third inconsistent handling of chunking in modes causes unnecessary confusion.\r\n\r\nTo fix these issues, this rewrites Dask Array's `pad` in these cases to not make use of NumPy's `pad`. Instead it performs the padding operations itself by building up the chunks for each dimension on either end and concatenating them with the original array. Thus the original array is simply passed through while padded chunks are generated around the edges.\r\n\r\n- [x] Tests added / passed\r\n- [x] Passes `flake8 dask`\r\n\r\ncc @hmaarrfk"},"comment":{"url":"https://api.github.com/repos/dask/dask/issues/comments/435623096","html_url":"https://github.com/dask/dask/pull/4152#issuecomment-435623096","issue_url":"https://api.github.com/repos/dask/dask/issues/4152","id":435623096,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTYyMzA5Ng==","user":{"login":"hmaarrfk","id":90008,"node_id":"MDQ6VXNlcjkwMDA4","avatar_url":"https://avatars0.githubusercontent.com/u/90008?v=4","gravatar_id":"","url":"https://api.github.com/users/hmaarrfk","html_url":"https://github.com/hmaarrfk","followers_url":"https://api.github.com/users/hmaarrfk/followers","following_url":"https://api.github.com/users/hmaarrfk/following{/other_user}","gists_url":"https://api.github.com/users/hmaarrfk/gists{/gist_id}","starred_url":"https://api.github.com/users/hmaarrfk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmaarrfk/subscriptions","organizations_url":"https://api.github.com/users/hmaarrfk/orgs","repos_url":"https://api.github.com/users/hmaarrfk/repos","events_url":"https://api.github.com/users/hmaarrfk/events{/privacy}","received_events_url":"https://api.github.com/users/hmaarrfk/received_events","type":"User","site_admin":false},"created_at":"2018-11-03T21:42:19Z","updated_at":"2018-11-03T21:42:19Z","author_association":"CONTRIBUTOR","body":"Yeah, i'm just worried that you are blowing up the computation graph by not having implemented the no-op concatenate.\r\n\r\n\r\nOtherwise it makes sense."}}
{"actor":{"display_login":"hmaarrfk"}}