html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/2298#issuecomment-406672721,https://api.github.com/repos/pydata/xarray/issues/2298,406672721,MDEyOklzc3VlQ29tbWVudDQwNjY3MjcyMQ==,1217238,2018-07-20T17:35:26Z,2018-07-20T17:35:26Z,MEMBER,"Indeed, I really like the look of https://github.com/dask/dask/issues/2538 and its implementation in https://github.com/dask/dask/pull/2608. It doesn't solve the indexing optimization *yet* but that could be pretty straightforward to add -- especially once we add a notion of [explicit indexing types](http://www.numpy.org/neps/nep-0021-advanced-indexing.html) (basic vs outer vs vectorized) directly into dask.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,342180429
https://github.com/pydata/xarray/issues/2298#issuecomment-406449411,https://api.github.com/repos/pydata/xarray/issues/2298,406449411,MDEyOklzc3VlQ29tbWVudDQwNjQ0OTQxMQ==,1217238,2018-07-20T00:02:34Z,2018-07-20T00:02:34Z,MEMBER,"> Therefore, personally, I'd like to see this lazy math by implementing a lazy array.
> The API I thought of is .to_lazy() which converts the backend to the lazy array,
> as similar to that .chunk() converts the backend to dask array.
This is not a bad idea, but the version of lazy arithmetic that I have been contemplating (see https://github.com/pydata/xarray/pull/2302) is not yet complete. For example, it doesn't have any way to represent a lazy aggregation.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,342180429
https://github.com/pydata/xarray/issues/2298#issuecomment-406104928,https://api.github.com/repos/pydata/xarray/issues/2298,406104928,MDEyOklzc3VlQ29tbWVudDQwNjEwNDkyOA==,1217238,2018-07-18T23:26:57Z,2018-07-18T23:26:57Z,MEMBER,"The main practical difference is that it allows us to reliably guarantee that expressions like `f(x, y)[i]` always get evaluated like `f(x[i], y[i])`. Dask doesn't have this optimization yet (https://github.com/dask/dask/issues/746), so indexing operations still compute the function `f()` on each block of an array. This issue provides full context from the xarray side: https://github.com/pydata/xarray/issues/1725
The typical example is spatially referenced imagery, e.g., a 2D satellite photo of the surface of the Earth with 2D latitude/longitude coordinates associated with each point. It would be very expensive to store full latitude and longitude arrays, but fortunately they can usually be computed cheaply from row and column indices.
Ideally, this logic would live outside xarray. But it's important enough to some xarray users (especially geoscience + astronomy) and we have enough related functionality (e.g., for lazy and explicit indexing) that it probably makes sense to add it.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,342180429