home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 318872962

This data as json

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-318872962 https://api.github.com/repos/pydata/xarray/issues/1496 318872962 MDEyOklzc3VlQ29tbWVudDMxODg3Mjk2Mg== 1217238 2017-07-30T02:19:26Z 2017-07-30T02:19:26Z MEMBER

One design decision here is how to handle alignment. The current version of where does an inner join between self and cond, but that wasn't carefully thought through -- more a side effect of making using of the binary arithmetic machinery.

I don't like this behavior for the three argument version of where, because it means that the indexes of other could remove non-NA values from the result, even if the condition is always True. This goes against one of our general principles, which is not aligning away non-missing values.

We can't use an outer join because we don't know how to handle NaNs in cond. We have a couple of other options: 1. We could require exact alignment for the three argument signature. This is simple and we already have the machinery. 2. We could require exact alignment to cond, but do some sort of more flexible alignment (e.g., an outer join) for self and other. This would require (at least) two calls to align() when other is provided, e.g., possibly ``` self, other = align(self, other, join='outer') self, other, cond = align(self, other, cond, join='inner')

still need to handle aligning data variables for Dataset objects

```

I am inclined to require exact alignment (i.e., join='exact') when three arguments are provided, because I know how to implement it correctly, and it still preserves the option of switching to more flexible alignment in the future.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  246502828
Powered by Datasette · Queries took 0.629ms · About: xarray-datasette