home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 415227870

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/2375#issuecomment-415227870 https://api.github.com/repos/pydata/xarray/issues/2375 415227870 MDEyOklzc3VlQ29tbWVudDQxNTIyNzg3MA== 1217238 2018-08-23T00:06:56Z 2018-08-23T00:06:56Z MEMBER

I think unstack() unstacking all dimensions by default would make sense.

Should we be using xr.full_like in this way?

I'm not really opposed to full_like working this way, but it does look a little strange to my eye. The "full" part of the name doesn't really make sense to me. I would usually suggest using the DataArray constructor here, e.g., xr.DataArray(output_values, flat_input.coords, flat_input.dims, flat_inputs.attrs).

Maybe we can figure a better way to spell "label these arrays like this template xarray object" that doesn't require referencing flat_input multiple times. Maybe xarray.label_like(array, source) or source.with_data(array)?

Would something like xr.unstack_like be desirable?

I'm not sure that a dedicated function unstack_like would make sense for xarray. This is the sort of helper function that you can write yourself in a couple of lines.

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