{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/sparse/issues/1","repository_url":"https://api.github.com/repos/pydata/sparse","labels_url":"https://api.github.com/repos/pydata/sparse/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/pydata/sparse/issues/1/comments","events_url":"https://api.github.com/repos/pydata/sparse/issues/1/events","html_url":"https://github.com/pydata/sparse/issues/1","id":222056212,"number":1,"title":"Support Everything that XArray Expects","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars3.githubusercontent.com/u/306380?v=4","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"labels":[{"id":584971912,"url":"https://api.github.com/repos/pydata/sparse/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2017-04-17T03:09:59Z","updated_at":"2018-02-06T17:59:17Z","closed_at":null,"author_association":"COLLABORATOR","body":"https://github.com/bolt-project/bolt/issues/58\r\n\r\n- [x]  single argument ufuncs (sin, exp, etc.) and ufunc like functions (pd.isnull, notnull, astype, around, isclose)\r\n- [x]  broadcasting binary operations (e.g., ndarray arithmetic)\r\n- [ ]  three argument version of where (preferably with broadcasting)\r\n- [ ]  aggregation methods\r\n    - [x] max/min/sum/prod\r\n    - [ ] argmax/argmin/std/var\r\n    - [ ]  nan-skipping aggregations (e.g., nanmean, nansum)\r\n- [x]  indexing with integer arrays, booleans, slices, None\r\n- [x]  transpose\r\n- [ ]  indexing:\r\n    - [x] basic indexing (`int`/`slice`)\r\n    - [ ] outer indexing (`int`, `slice` and 1d integer arrays separately applied to each axis)\r\n    - [ ] vectorized indexing (integer arrays with broadcasting, like NumPy)\r\n- [x]  broadcast_to (NumPy 1.10)\r\n- [x]  concatenate and stack (NumPy 1.10)\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/sparse/issues/comments/363509809","html_url":"https://github.com/pydata/sparse/issues/1#issuecomment-363509809","issue_url":"https://api.github.com/repos/pydata/sparse/issues/1","id":363509809,"user":{"login":"shoyer","id":1217238,"avatar_url":"https://avatars2.githubusercontent.com/u/1217238?v=4","gravatar_id":"","url":"https://api.github.com/users/shoyer","html_url":"https://github.com/shoyer","followers_url":"https://api.github.com/users/shoyer/followers","following_url":"https://api.github.com/users/shoyer/following{/other_user}","gists_url":"https://api.github.com/users/shoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/shoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoyer/subscriptions","organizations_url":"https://api.github.com/users/shoyer/orgs","repos_url":"https://api.github.com/users/shoyer/repos","events_url":"https://api.github.com/users/shoyer/events{/privacy}","received_events_url":"https://api.github.com/users/shoyer/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T17:59:17Z","updated_at":"2018-02-06T17:59:17Z","author_association":"OWNER","body":"> Consider two arrays `a` and `b`. Here, `a.shape = (10**5,)`, and `b.shape = (10**5, 10**5)`. Also, `a.nnz = b.nnz = 1`. Now suppose I'm computing `a * b`. We currently optimize this by noticing that `func(0, b.data) = 0` and `func(a.data, 0) = 0`. Therefore, we compute the \"full matches\", and don't compute the \"partial matches\". If you were to calculate `a * b` and `a + b` in this situation, you would see the speed difference.\r\n\r\nIt seems like the solution we need here is a \"sparse broadcast\" function, which only repeats non-zero indices in the result. . The algorithm would look something like:\r\n- Find all indices that are non-zero for each dimension on one of more arrays.\r\n- When broadcasting, only fill in these these indices.\r\n\r\n\"sparse\" vs \"regular\" broadcasting could be chosen based on the nature of the operator being applied (e.g., `*` vs `+`)"}}
{"actor":{"display_login":"shoyer"}}