home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 609827384

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/3941#issuecomment-609827384 https://api.github.com/repos/pydata/xarray/issues/3941 609827384 MDEyOklzc3VlQ29tbWVudDYwOTgyNzM4NA== 2448579 2020-04-06T14:24:53Z 2020-04-06T14:24:53Z MEMBER

where is usually the solution for this kind of problem. I added the keepdims to keep the y dimension after the sum.

python yindex = a.y.copy(data=np.arange(a.sizes["y"])) # generate DataArray of indexes a.where((yindex >= sindex) & (yindex <= eindex)).sum("y", keepdims=True)

Please close if this answers your question.

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