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/pull/1496#issuecomment-320755613,https://api.github.com/repos/pydata/xarray/issues/1496,320755613,MDEyOklzc3VlQ29tbWVudDMyMDc1NTYxMw==,6200806,2017-08-07T19:19:56Z,2017-08-07T19:19:56Z,CONTRIBUTOR,">any final comments
@jhamman none; thanks @shoyer for including the function-version of where","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,246502828
https://github.com/pydata/xarray/pull/1496#issuecomment-318957832,https://api.github.com/repos/pydata/xarray/issues/1496,318957832,MDEyOklzc3VlQ29tbWVudDMxODk1NzgzMg==,6200806,2017-07-31T03:18:44Z,2017-07-31T03:18:44Z,CONTRIBUTOR,"Thanks @shoyer. I guess what I had in mind is the case where both `x` and `y` are scalars, while `cond` is still a condition on `a`. In that case you couldn't do `x.where(cond, y)`; it would require either `a.where(cond, x, y)` or `where(cond, x, y)` being supported. Am I understanding that correctly? (If I'm not being clear, consider a concrete case by plugging in e.g. `x=-2`, `y=0`, and `cond=(a.x + a.y < 5)`.)
`a.where(cond, x, y)` might seem odd, since it doesn't actually retain any of `a`'s values, but then it could retain coordinates and attributes, so it might still be useful. And this differs from `where(cond, x, y)`, which it seems would retain `cond`'s coords and attrs.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,246502828
https://github.com/pydata/xarray/pull/1496#issuecomment-318931493,https://api.github.com/repos/pydata/xarray/issues/1496,318931493,MDEyOklzc3VlQ29tbWVudDMxODkzMTQ5Mw==,6200806,2017-07-30T21:38:45Z,2017-07-30T21:38:45Z,CONTRIBUTOR,"How difficult would it be to include `np.where`'s option to provide values for both where the condition is met and where it isn't? From their docstring:
>If both x and y are specified, the output array contains elements of x where condition is True, and elements from y elsewhere.
From your example above (haven't gone through the code), what you have implemented in this PR is a special case, namely the xarray analog to `np.where(a.x + a.y < 5, a, -1)`.
I recently had a usecase where this would be handy.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,246502828