home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 391910422

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/issues/2183#issuecomment-391910422 https://api.github.com/repos/pydata/xarray/issues/2183 391910422 MDEyOklzc3VlQ29tbWVudDM5MTkxMDQyMg== 6815844 2018-05-25T01:03:04Z 2018-05-25T01:03:04Z MEMBER

Reopening as I think we need to discuss this behavior more deeply.

The similar thing happens if we pass drop=True, ```python In [9]: test_ds.where(test_ds['var1'] == 1) Out[9]: <xarray.Dataset> Dimensions: (dim_0: 5) Dimensions without coordinates: dim_0 Data variables: var1 (dim_0) float64 nan 1.0 nan nan nan var2 (dim_0) float64 nan 1.0 nan nan nan

In [10]: test_ds.where(test_ds['var1'] == 1, drop=True) Out[10]: <xarray.Dataset> Dimensions: (dim_0: 1) Dimensions without coordinates: dim_0 Data variables: var1 (dim_0) float64 1.0 var2 (dim_0) float64 1.0 ```

I think that if with drop=False, the output dtype should be float even if all the items satisfies the condition. It makes the behavior consistent among the cases where the conditions are met or not.

My question, may be we need to discuss more, is drop=True case. In this case, there are never nan for any condition. Do we need to convert the dtype?

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