home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 903055859 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • dranjan 2
  • benbovy 2
  • max-sixty 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 2

issue 1

  • Regression: "ValueError: cannot unstack dimensions that do not have a MultiIndex" when unstacking a MultiIndex · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
849935768 https://github.com/pydata/xarray/issues/5384#issuecomment-849935768 https://api.github.com/repos/pydata/xarray/issues/5384 MDEyOklzc3VlQ29tbWVudDg0OTkzNTc2OA== dranjan 404832 2021-05-27T20:56:04Z 2021-05-27T20:56:04Z CONTRIBUTOR

Interesting! Thanks for the heads-up, @benbovy. I'll keep my eye on that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression: "ValueError: cannot unstack dimensions that do not have a MultiIndex" when unstacking a MultiIndex 903055859
849733928 https://github.com/pydata/xarray/issues/5384#issuecomment-849733928 https://api.github.com/repos/pydata/xarray/issues/5384 MDEyOklzc3VlQ29tbWVudDg0OTczMzkyOA== benbovy 4160723 2021-05-27T15:35:18Z 2021-05-27T15:35:18Z MEMBER

This should be fixed in #5385.

Side note: the example you gave here, i.e.,

python ds = Dataset({'d': DataArray(c.data, dims=['c'])}, coords=c.coords) ds = ds.unstack(['c'])

should probably be depreciated after the index refactoring in Xarray (currently WIP), which aims to decouple the concepts of coordinates vs. indexes. More specifically, indexes shouldn't be passed implicitly via the coords argument of the Dataset/DataArray constructors anymore, but instead explicitly via the indexes argument (see https://github.com/pydata/xarray/blob/master/design_notes/flexible_indexes_notes.md#22-explicit-vs-implicit-index-creation).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression: "ValueError: cannot unstack dimensions that do not have a MultiIndex" when unstacking a MultiIndex 903055859
849602816 https://github.com/pydata/xarray/issues/5384#issuecomment-849602816 https://api.github.com/repos/pydata/xarray/issues/5384 MDEyOklzc3VlQ29tbWVudDg0OTYwMjgxNg== benbovy 4160723 2021-05-27T12:44:08Z 2021-05-27T12:44:08Z MEMBER

This has been introduced in #5102. I'm looking into it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression: "ValueError: cannot unstack dimensions that do not have a MultiIndex" when unstacking a MultiIndex 903055859
849271660 https://github.com/pydata/xarray/issues/5384#issuecomment-849271660 https://api.github.com/repos/pydata/xarray/issues/5384 MDEyOklzc3VlQ29tbWVudDg0OTI3MTY2MA== dranjan 404832 2021-05-27T02:35:51Z 2021-05-27T02:35:51Z CONTRIBUTOR

I'm not sure how common it is for MultiIndexes to have a single index, but we should be general over any number.

That makes sense, and it actually pretty much sums up how I encountered this. My code here is a reduction of a function I wrote that was supposed to work with a fairly general array and subset of its dimensions, and I happened to call it with a one-element dimension list.

We'd definitely take a fix for this.

In principle, I'd be happy to help, but I haven't gone into the xarray internals at all yet, nor do I have the dev environment set up (in particular, I don't have conda), so it would probably take me a while.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression: "ValueError: cannot unstack dimensions that do not have a MultiIndex" when unstacking a MultiIndex 903055859
849246165 https://github.com/pydata/xarray/issues/5384#issuecomment-849246165 https://api.github.com/repos/pydata/xarray/issues/5384 MDEyOklzc3VlQ29tbWVudDg0OTI0NjE2NQ== max-sixty 5635139 2021-05-27T01:31:49Z 2021-05-27T01:32:18Z MEMBER

This does look like a bug, specifically affecting MultiIndexes containing only one Index.

The issue seems to be that self.get_index('c') returns a normal index:

```python 4020 non_multi_dims = [ 4021 d for d in dims if not isinstance(self.get_index(d), pd.MultiIndex) 4022 ] 4023 if non_multi_dims: -> 4024 raise ValueError( 4025 "cannot unstack dimensions that do not " 4026 f"have a MultiIndex: {non_multi_dims}" 4027 ) 4028 4029 result = self.copy(deep=False) 4030 for dim in dims:

ipdb> self.get_index('c') Index([(0,)], dtype='object') # <- single index

ipdb> self <xarray.Dataset> Dimensions: (c: 1) Coordinates: * c (c) MultiIndex # <- multi index - b (c) int64 0 a (c) int64 0 Data variables: d (c) int64 0 ```

I'm not sure how common it is for MultiIndexes to have a single index, but we should be general over any number.

We'd definitely take a fix for this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Regression: "ValueError: cannot unstack dimensions that do not have a MultiIndex" when unstacking a MultiIndex 903055859

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 12.751ms · About: xarray-datasette