home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 883226384

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/5620#issuecomment-883226384 https://api.github.com/repos/pydata/xarray/issues/5620 883226384 IC_kwDOAMm_X840pPcQ 14808389 2021-07-20T09:01:34Z 2021-07-20T09:01:34Z MEMBER

@meteoDaniel, it ultimately comes down to how much time a maintainer is willing to spend on a single issue, with self-contained, small examples being much easier to debug (and there are a few other reasons in the blog post linked to by @max-sixty).

That said, I can reproduce your issue, which apparently is independent of the way the mask is constructed: ```python mask = ( (latitudes <= maxLat) & (latitudes > minLat) & (longitudes <= maxLon) & (longitudes > minLon) )

ds.where(xr.DataArray(mask, dims=("y", "x")), drop=True).latitude.max() # 49.30 latitudes[mask].max() # 48.92 ```

However, if I do python subset = ds.latitude.where(xr.DataArray(mask, dims=("y", "x")), drop=True) subset.max() I get the same result as with pure numpy.

Interestingly, xr.testing.assert_identical(subset, subset.latitude) raises...

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