home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where author_association = "CONTRIBUTOR" and user = 31126826 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 5

  • Multi-index with categorical values 4
  • In-place addition of arrays with the same coords but in a different order 3
  • Fail to sel() when index comes from categorical pandas Series 1
  • Proposal for better error message about in-place operation 1
  • Interpolation along dimension with a single element 1

user 1

  • mancellin · 10 ✖

author_association 1

  • CONTRIBUTOR · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1102343409 https://github.com/pydata/xarray/issues/4275#issuecomment-1102343409 https://api.github.com/repos/pydata/xarray/issues/4275 IC_kwDOAMm_X85BtGzx mancellin 31126826 2022-04-19T09:02:57Z 2022-04-19T09:02:57Z CONTRIBUTOR

No worry, I had actually forgotten about this. In a more recent version (2022.3.0), both 1D and 2D case return the same ValueError with a relatively clear message x and y arrays must have at least 2 entries.

I'm still proposing that any valid code with sel should behave the same with interp, and thus that interp should work when a dimension has a single entry. But this is a low priority issue with easy workarounds.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation along dimension with a single element 666270493
615256103 https://github.com/pydata/xarray/pull/3976#issuecomment-615256103 https://api.github.com/repos/pydata/xarray/issues/3976 MDEyOklzc3VlQ29tbWVudDYxNTI1NjEwMw== mancellin 31126826 2020-04-17T13:51:50Z 2020-04-17T13:52:05Z CONTRIBUTOR

Thank you for your comments @shoyer I agree with all of them and have updated the code.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Proposal for better error message about in-place operation 601185984
614146417 https://github.com/pydata/xarray/issues/3910#issuecomment-614146417 https://api.github.com/repos/pydata/xarray/issues/3910 MDEyOklzc3VlQ29tbWVudDYxNDE0NjQxNw== mancellin 31126826 2020-04-15T16:35:46Z 2020-04-15T16:35:46Z CONTRIBUTOR

Well actually, I would be at least as surprised if A += B returned a different result than A = A + B.

So now I understand why this is not supported. I'll submit the PR soon.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  In-place addition of arrays with the same coords but in a different order 589632313
606100412 https://github.com/pydata/xarray/issues/3910#issuecomment-606100412 https://api.github.com/repos/pydata/xarray/issues/3910 MDEyOklzc3VlQ29tbWVudDYwNjEwMDQxMg== mancellin 31126826 2020-03-30T16:22:04Z 2020-03-30T16:22:04Z CONTRIBUTOR

Yes. But the not-in-place addition A+B works fine without conversion to float because it uses basically xr.align(A, B, join='inner'). If the in-place addition did the same, there would be no risk of type conversion. But I guess the in-place version would rather use something like xr.align(A, B, join='left') to guarantee that the shape and index of A does not change. Am I right?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  In-place addition of arrays with the same coords but in a different order 589632313
605847162 https://github.com/pydata/xarray/issues/3910#issuecomment-605847162 https://api.github.com/repos/pydata/xarray/issues/3910 MDEyOklzc3VlQ29tbWVudDYwNTg0NzE2Mg== mancellin 31126826 2020-03-30T08:06:32Z 2020-03-30T08:06:32Z CONTRIBUTOR

I can submit a PR. But the comment cited above is not totally clear to me.

The purpose of the conversion to floats is to have NaNs in case the shapes do not match. So the core of the issue is that A + B might not have the same shape as A, and thus in general A + B cannot replace A in-place. Is that right?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  In-place addition of arrays with the same coords but in a different order 589632313
598718876 https://github.com/pydata/xarray/issues/3674#issuecomment-598718876 https://api.github.com/repos/pydata/xarray/issues/3674 MDEyOklzc3VlQ29tbWVudDU5ODcxODg3Ng== mancellin 31126826 2020-03-13T13:26:38Z 2020-03-13T13:26:38Z CONTRIBUTOR

Yes, I'll give it a try.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Multi-index with categorical values 547091670
597536240 https://github.com/pydata/xarray/issues/3674#issuecomment-597536240 https://api.github.com/repos/pydata/xarray/issues/3674 MDEyOklzc3VlQ29tbWVudDU5NzUzNjI0MA== mancellin 31126826 2020-03-11T09:44:48Z 2020-03-11T09:44:48Z CONTRIBUTOR

@fujiisoup Since you implemented remove_unused_levels_categories, do you have any clue how to fix this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Multi-index with categorical values 547091670
583065626 https://github.com/pydata/xarray/issues/3674#issuecomment-583065626 https://api.github.com/repos/pydata/xarray/issues/3674 MDEyOklzc3VlQ29tbWVudDU4MzA2NTYyNg== mancellin 31126826 2020-02-06T19:17:49Z 2020-02-06T19:17:49Z CONTRIBUTOR

Actually, after updating to version 0.15 I've found another issue in the same context. More precisely, when using a multi-index with a non-categorical repeated coordinate and a categorical coordinate:

```python import pandas as pd

i1 = pd.Series([0, 0]) cat = pd.CategoricalDtype(categories=['foo', 'bar', 'baz']) i2 = pd.Series(['foo', 'bar'], dtype=cat)

df = pd.DataFrame({'i1': i1, 'i2': i2, 'values': [1, 2]}) ds = df.set_index(['i1', 'i2']).to_xarray()

print(ds) raises the following error Traceback (most recent call last): File "/home/matthieu/test.py", line 8, in <module> ds = df.set_index(['i1', 'i2']).to_xarray() File "/opt/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py", line 2867, in to_xarray return xarray.Dataset.from_dataframe(self) File "/opt/anaconda3/lib/python3.7/site-packages/xarray/core/dataset.py", line 4555, in from_dataframe idx = remove_unused_levels_categories(dataframe.index) File "/opt/anaconda3/lib/python3.7/site-packages/xarray/core/indexes.py", line 26, in remove_unused_levels_ categories index = pd.MultiIndex.from_arrays(levels, names=index.names) File "/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/multi.py", line 425, in from_arrays raise ValueError("all arrays must be same length") ValueError: all arrays must be same length `` but works fine wheni2` is not categorical.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Multi-index with categorical values 547091670
579379370 https://github.com/pydata/xarray/issues/3674#issuecomment-579379370 https://api.github.com/repos/pydata/xarray/issues/3674 MDEyOklzc3VlQ29tbWVudDU3OTM3OTM3MA== mancellin 31126826 2020-01-28T18:04:32Z 2020-01-28T18:04:32Z CONTRIBUTOR

Thank you for your work on this! I haven't found any other issue at the moment, I guess we can close this issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Multi-index with categorical values 547091670
572248703 https://github.com/pydata/xarray/issues/3669#issuecomment-572248703 https://api.github.com/repos/pydata/xarray/issues/3669 MDEyOklzc3VlQ29tbWVudDU3MjI0ODcwMw== mancellin 31126826 2020-01-08T20:44:04Z 2020-01-08T20:44:04Z CONTRIBUTOR

Your patch fixes the issue, thank you!

FYI, found another issue with categorical values: #3674

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fail to sel() when index comes from categorical pandas Series 546727720

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 14.587ms · About: xarray-datasette