home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 326205036 and user = 6815844 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • fujiisoup · 7 ✖

issue 1

  • How should Dataset.update() handle conflicting coordinates? · 7 ✖

author_association 1

  • MEMBER 7
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
391919607 https://github.com/pydata/xarray/issues/2180#issuecomment-391919607 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkxOTYwNw== fujiisoup 6815844 2018-05-25T02:06:47Z 2018-05-25T02:19:45Z MEMBER

For referene the original issue in #2068 was ```python In [4]: ds = xr.Dataset() ...: ds.coords['source'] = (['a', 'b', 'c'], np.random.random((2, 3, 4))) ...: ds.coords['unrelated'] = (['a', 'c'], np.random.random((2, 4))) ...: ds ...: Out[4]: <xarray.Dataset> Dimensions: (a: 2, b: 3, c: 4) Coordinates: source (a, b, c) float64 0.4158 0.07152 0.4258 0.4382 0.6616 0.142 ... unrelated (a, c) float64 0.9318 0.03723 0.4226 0.9472 0.8753 0.7022 ... Dimensions without coordinates: a, b, c Data variables: empty

In [5]: ds['dest-2'] = xr.ones_like(ds['source'].isel(c=0)) ...: ds ...: Out[5]: <xarray.Dataset> Dimensions: (a: 2, b: 3) Coordinates: source (a, b) float64 0.4158 0.6616 0.1583 0.7821 0.221 0.2555 unrelated (a) float64 0.9318 0.8753 Dimensions without coordinates: a, b Data variables: dest-2 (a, b) float64 1.0 1.0 1.0 1.0 1.0 1.0 `` whereds['unrelated']drops dimensionc`. We changed this behavior in #2087, but I think it was a wrong direction.

The previous behavior might be OK as long as unrelated is a coordinate variable.

EDIT: I still feel something strange both in the previous and current behavior of __setitem__ with coord. Generally, as @crusaderky has pointed out, the right join will be a better choice. But In the above example, dropping the dimension of c of 'unrelated' looks also awkward.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391915849 https://github.com/pydata/xarray/issues/2180#issuecomment-391915849 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkxNTg0OQ== fujiisoup 6815844 2018-05-25T01:41:27Z 2018-05-25T01:41:27Z MEMBER

Thanks, @crusaderky. The first behavior you pointed out is a bug I think. I raised an issue in #2184, and maybe it should be discussed there.

For the second example,

I think this should be a right join.

I agree with this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391910682 https://github.com/pydata/xarray/issues/2180#issuecomment-391910682 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkxMDY4Mg== fujiisoup 6815844 2018-05-25T01:05:13Z 2018-05-25T01:30:47Z MEMBER

So maybe we can leave the current behavior as is for now (but remove the warning).

Agreed.

~@shoyer, how do you think about the current __setitem__ behavior with conflict dimension coordinate? Should it be outer join as @crusaderky pointed out?~

EDIT: I did not noticed the above comment. I will raise an issue for this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391908483 https://github.com/pydata/xarray/issues/2180#issuecomment-391908483 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkwODQ4Mw== fujiisoup 6815844 2018-05-25T00:48:27Z 2018-05-25T00:48:27Z MEMBER

2087 changed the second behavior.

```python In [1]: import xarray ...: ...: fridge = xarray.Dataset( ...: data_vars={ ...: 'var1': ('fruit', [10]), ...: }, ...: coords={ ...: 'fruit': ('fruit', [1]), ...: 'quality': ('fruit', ['Red Velvet']), ...: }) ...: shopping = xarray.Dataset( ...: data_vars={ ...: 'var1': ('fruit', [20]), ...: }, ...: coords={ ...: 'fruit': ('fruit', [1]), ...: 'quality': ('fruit', ['Tangerine']), ...: }) ...: ...: fridge['var1'] = shopping['var1'] ...:

```

with v10.3 python In [2]: fridge Out[2]: <xarray.Dataset> Dimensions: (fruit: 1) Coordinates: * fruit (fruit) int64 1 quality (fruit) <U9 'Tangerine' Data variables: var1 (fruit) int64 20 and with v10.4 python In [3]: fridge Out[3]: <xarray.Dataset> Dimensions: (fruit: 1) Coordinates: * fruit (fruit) int64 1 quality (fruit) <U10 'Red Velvet' Data variables: var1 (fruit) int64 20

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391905598 https://github.com/pydata/xarray/issues/2180#issuecomment-391905598 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkwNTU5OA== fujiisoup 6815844 2018-05-25T00:26:59Z 2018-05-25T00:26:59Z MEMBER

I got cofused... I was wrong. I thought it would be an outer joing

I think we need to discuss two issues here separately. 1. If there are conflicts in dimension coordinate, should it be outer join? 2. If there are no conflicts in dimension coordinate, but there are conflicts in non dimension coordinate, whether left or right should be prioritized?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391902317 https://github.com/pydata/xarray/issues/2180#issuecomment-391902317 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkwMjMxNw== fujiisoup 6815844 2018-05-25T00:04:58Z 2018-05-25T00:04:58Z MEMBER

I think we should discuss dimension coordinte and non-dimenson coordinate separately. I guess @shoyer meant non-dimenson coordinate here.

For dimension coordinte, it is always outer join, if I understand correctly.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391899432 https://github.com/pydata/xarray/issues/2180#issuecomment-391899432 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTg5OTQzMg== fujiisoup 6815844 2018-05-24T23:47:52Z 2018-05-24T23:49:15Z MEMBER

I think dataset.update(other) should be equivalent with python for key, value in other.items(): dataset[key] = value as similar to python native dict.

Our .item() ony iterates over data_vars not coordinate. So I think even in dataset.update(other) coordinates from other should be dropped if there is a conflict.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036

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