home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 468088653

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/2777#issuecomment-468088653 https://api.github.com/repos/pydata/xarray/issues/2777 468088653 MDEyOklzc3VlQ29tbWVudDQ2ODA4ODY1Mw== 35968931 2019-02-28T00:38:11Z 2019-02-28T00:38:11Z MEMBER

@Zac-HD there's actually another way to get the indexing behaviour you wanted with the current API:

python colors = "blue green red".split() das = [xr.DataArray(np.random.random((2, 2)), dims="x y".split(), coords={"band": k}) for k in colors] xr.concat(das, dim="band").plot.imshow(col="band") Here instead of using the name attribute to label each band I've used a scalar coordinate called "band", so that when you concat along "band" it will just stack along that coordinate.

This never touches the names so actually gives the desired output without the need for #2792:

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