home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1451754167

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/7516#issuecomment-1451754167 https://api.github.com/repos/pydata/xarray/issues/7516 1451754167 IC_kwDOAMm_X85WiAK3 1492047 2023-03-02T11:59:47Z 2023-03-02T11:59:47Z CONTRIBUTOR

The .variable computation is fast but it cannot be directly used like you suggest: ``` dsx.where(sel.variable, drop=True)

TypeError: cond argument is <xarray.Variable (num_lines: 5761870, num_pixels: 71)> ... but must be a <class 'xarray.core.dataset.Dataset'> or <class 'xarray.core.dataarray.DataArray'> ```

Doing it like this seems to be working correctly (and is fast enough): dsx["x"]= sel.variable.compute() dsx.where(dsx["x"], drop=True)

_nadir variables have the same chunks and are way faster to read than the other ones (lot smaller).

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