{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/11954","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/11954/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/11954/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/11954/events","html_url":"https://github.com/numpy/numpy/pull/11954","id":360449126,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NzA2NzU4","number":11954,"title":"ENH: Pad single copy for constant and edge mode.","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-14T20:45:33Z","updated_at":"2018-09-15T03:03:34Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/11954","html_url":"https://github.com/numpy/numpy/pull/11954","diff_url":"https://github.com/numpy/numpy/pull/11954.diff","patch_url":"https://github.com/numpy/numpy/pull/11954.patch"},"body":"This is a start at addressing #11126\r\n\r\nPadding was causing the array to be copied `2*arr.ndim` times which can be huge for large arrays.\r\n\r\nI did not comment my helper functions. \r\nThey are 1-2 line long.\r\nIf numpy requires those to be commented then please let me know.\r\n\r\nModes finished:\r\n  * [x] constant\r\n  * [x] edge\r\n  * [ ] linear_ramp\r\n  * [x] maximum\r\n  * [x] mean\r\n  * [x] median\r\n  * [x] minimum\r\n  * [ ] reflect\r\n  * [ ] symmetric\r\n  * [ ] wrap\r\n\r\nI'm glad to pass on the torch.\r\n\r\nBefore\r\n```\r\n================== ========== ========== ============= ========== ========== ========== ========== ========== =========== ==========\r\n--                                                                        mode                                                      \r\n------------------ -----------------------------------------------------------------------------------------------------------------\r\n    shape         constant     edge     linear_ramp   maximum      mean      median    minimum    reflect    symmetric     wrap   \r\n================== ========== ========== ============= ========== ========== ========== ========== ========== =========== ==========\r\n   (64, 64)       625±0μs    747±0μs      1.32±0ms    1.03±0ms   1.22±0ms   2.51±0ms   1.41±0ms   506±0μs     617±0μs    618±0μs  \r\n  (256, 256)      2.57±0ms   3.02±0ms     4.44±0ms    4.56±0ms   4.50±0ms   9.95±0ms   4.61±0ms   2.69±0ms    2.71±0ms   2.59±0ms \r\n  (512, 512)      8.38±0ms   6.59±0ms     7.64±0ms    9.02±0ms   7.15±0ms   19.3±0ms   11.4±0ms   8.07±0ms    6.77±0ms   8.64±0ms \r\n (10, 10, 10)     1.31±0ms   1.02±0ms     2.56±0ms    883±0μs    2.09±0ms   3.74±0ms   1.81±0ms   1.28±0ms    892±0μs    853±0μs  \r\n (10, 64, 64)     5.88±0ms   8.69±0ms     12.2±0ms    9.89±0ms   6.38±0ms   13.3±0ms   10.8±0ms   5.91±0ms    5.16±0ms   4.39±0ms \r\n(50, 1024, 1024)   1.88±0s    1.85±0s      2.20±0s     2.23±0s    2.15±0s    5.63±0s    2.24±0s    1.11±0s     1.10±0s    1.11±0s  \r\n================== ========== ========== ============= ========== ========== ========== ========== ========== =========== ==========\r\n```\r\n\r\nAfter (only constant and edge were implemented)\r\n```\r\n\r\n\r\n================== ========== ========== ============= ========== ========== ========== ========== ========== =========== ==========\r\n--                                                                        mode                                                      \r\n------------------ -----------------------------------------------------------------------------------------------------------------\r\n    shape         constant     edge     linear_ramp   maximum      mean      median    minimum    reflect    symmetric     wrap   \r\n================== ========== ========== ============= ========== ========== ========== ========== ========== =========== ==========\r\n   (64, 64)       840±0μs    825±0μs      916±0μs     962±0μs    858±0μs    2.10±0ms   667±0μs    595±0μs     655±0μs    634±0μs  \r\n  (256, 256)      1.94±0ms   1.91±0ms     4.45±0ms    4.57±0ms   4.41±0ms   5.65±0ms   3.16±0ms   2.46±0ms    1.11±0ms   2.57±0ms \r\n  (512, 512)      3.00±0ms   4.77±0ms     10.4±0ms    10.4±0ms   9.34±0ms   21.4±0ms   10.6±0ms   6.99±0ms    6.77±0ms   4.52±0ms \r\n (10, 10, 10)     1.10±0ms   1.14±0ms     2.57±0ms    1.83±0ms   1.49±0ms   3.84±0ms   1.83±0ms   1.30±0ms    938±0μs    605±0μs  \r\n (10, 64, 64)     2.66±0ms   3.33±0ms     10.7±0ms    8.38±0ms   7.58±0ms   14.5±0ms   8.83±0ms   5.67±0ms    4.82±0ms   5.01±0ms \r\n(50, 1024, 1024)   411±0ms    419±0ms      2.20±0s     2.23±0s    2.15±0s    5.69±0s    2.25±0s    1.12±0s     1.11±0s    1.08±0s  \r\n================== ========== ========== ============= ========== ========== ========== ========== ========== =========== ==========\r\n\r\n```\r\n\r\ncc @jakirkham "},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/421526098","html_url":"https://github.com/numpy/numpy/pull/11954#issuecomment-421526098","issue_url":"https://api.github.com/repos/numpy/numpy/issues/11954","id":421526098,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTUyNjA5OA==","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-09-15T03:03:34Z","updated_at":"2018-09-15T03:03:34Z","author_association":"CONTRIBUTOR","body":"Man. Totally didn’t see that PR. Ill have to compare as to how it fairs with the performance of this one. "}}
{"actor":{"display_login":"hmaarrfk"}}