home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 696907513

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/4450#issuecomment-696907513 https://api.github.com/repos/pydata/xarray/issues/4450 696907513 MDEyOklzc3VlQ29tbWVudDY5NjkwNzUxMw== 2448579 2020-09-22T18:41:13Z 2020-09-22T18:42:37Z MEMBER

That code passes keep_attrs to np.mean so it won't work. we should add keep_attrs as a kwarg to map

you'll have to do it like this import numpy as np import xarray as xr ds = xr.tutorial.open_dataset("air_temperature") with xr.set_options(keep_attrs=True): test_map = ds.groupby('lat').map(np.mean) test_map.lat

but it doesn't work for the coordinate variables. We'll have to fix it. Right now, you'll have to propagate attrs manually

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