home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 765064046

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/4837#issuecomment-765064046 https://api.github.com/repos/pydata/xarray/issues/4837 765064046 MDEyOklzc3VlQ29tbWVudDc2NTA2NDA0Ng== 1217238 2021-01-22T02:07:07Z 2021-01-22T02:07:07Z MEMBER

Related: There's some weirdness about _to_temp_dataset not preserving name.

It used to preserve name, but now name is always set to the _THIS_ARRAY object. This is for two reasons:

  1. It isn't always possible to convert a DataArray into a Dataset preserving name, if name is also found on a coordinate.
  2. To ensure that xarray functions always work, even in this case, it was more reliable to always replace the name. If we only replaced name in case (1), then it's likely that some functions wouldn't handle names of that form and would produce an error only in that case.

To the extent the goal is "apply a function that takes a dataset to this dataarray", we could make a function that does exactly that and use _to_temp_dataset within that. Does that make sense?

This sounds like a fine idea to me. It's kind of the opposite of Dataset.map.

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