home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 535013577

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/pull/3312#issuecomment-535013577 https://api.github.com/repos/pydata/xarray/issues/3312 535013577 MDEyOklzc3VlQ29tbWVudDUzNTAxMzU3Nw== 35968931 2019-09-25T13:08:00Z 2019-09-25T13:27:18Z MEMBER

would it make sense for the combine methods to always return an object of the same type as the inputs? E.g., list of DataArray -> DataArray, list of Dataset -> Dataset?

I don't think so. Even for an input of only DataArrays, depending on the actual names and values in the DataArrays, the result of a combine could be a DataArray or a Dataset. So would it not it be simpler to

1) Promote all inputs to Datasets (or @friedrichknuth's "dict_like_objects") 2) Do the combining 3) If the result has only a single variable then demote from Dataset to DataArray?

That way the result is always the simplest object that can hold the result of combining that particular set of inputs, and the combining internals only have to handle DataSet objects.

EDIT: Oh wait but that won't work in the case of unnamed DataArrays right? EDIT2: Actually _to_temp_dataset will handle that case too?

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