home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 252490115 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • keewis 3
  • dcherian 1
  • klapo 1
  • stale[bot] 1

author_association 2

  • MEMBER 4
  • NONE 2

issue 1

  • Assignment · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1114798980 https://github.com/pydata/xarray/issues/1519#issuecomment-1114798980 https://api.github.com/repos/pydata/xarray/issues/1519 IC_kwDOAMm_X85CcnuE stale[bot] 26384082 2022-05-02T12:37:49Z 2022-05-02T12:37:49Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assignment 252490115
611501372 https://github.com/pydata/xarray/issues/1519#issuecomment-611501372 https://api.github.com/repos/pydata/xarray/issues/1519 MDEyOklzc3VlQ29tbWVudDYxMTUwMTM3Mg== dcherian 2448579 2020-04-09T12:29:53Z 2020-04-09T12:29:53Z MEMBER

How does this even work? :scream:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assignment 252490115
611480620 https://github.com/pydata/xarray/issues/1519#issuecomment-611480620 https://api.github.com/repos/pydata/xarray/issues/1519 MDEyOklzc3VlQ29tbWVudDYxMTQ4MDYyMA== keewis 14808389 2020-04-09T11:34:57Z 2020-04-09T11:34:57Z MEMBER

since it came up in #3939, I played around with this, and it seems the obj.sel(x=1)[...] = 0 syntax only works for DataArray objects and when assigning a single value. Should we try to make it work the same way as loc?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assignment 252490115
604553156 https://github.com/pydata/xarray/issues/1519#issuecomment-604553156 https://api.github.com/repos/pydata/xarray/issues/1519 MDEyOklzc3VlQ29tbWVudDYwNDU1MzE1Ng== keewis 14808389 2020-03-26T17:07:42Z 2020-03-26T17:50:49Z MEMBER

it's not that it fails, the original dataset is just not updated: ```python In [2]: ds = xr.Dataset({ ...: "a": ("x", np.arange(4)), ...: "b": ("x", np.arange(4)), ...: })

In [3]: selected = ds.loc[{"x": 1}] ...: selected["a"] = 10 ...: ds, selected Out[3]: (<xarray.Dataset> Dimensions: (x: 4) Dimensions without coordinates: x Data variables: a (x) int64 0 1 2 3 b (x) int64 0 1 2 3, <xarray.Dataset> Dimensions: () Data variables: a int64 10 b int64 1) to make it work, use (note the `[...]`)python In [7]: selected = ds.loc[{"x": 1}] ...: selected["a"][...] = 10 ...: ds, selected Out[7]: (<xarray.Dataset> Dimensions: (x: 4) Dimensions without coordinates: x Data variables: a (x) int64 0 10 2 3 b (x) int64 0 1 2 3, <xarray.Dataset> Dimensions: () Data variables: a int64 10 b int64 1) `` The difference is that without the extra[...]we don't modify the values but instead create a new variable (so something likeds["new_variable"] = ("x", [1, 3, 4, 5])`)

Also note that while ds.a.sel(x=1) = 10 raises a SyntaxError, ds.a.sel(x=1)[...] = 10 or ds.sel(x=1).a[...] = 10 have exactly the same effect as their loc counterparts.

We probably should add an explanation and examples to the documentation (loc / sel and maybe the indexing page?)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assignment 252490115
604562843 https://github.com/pydata/xarray/issues/1519#issuecomment-604562843 https://api.github.com/repos/pydata/xarray/issues/1519 MDEyOklzc3VlQ29tbWVudDYwNDU2Mjg0Mw== keewis 14808389 2020-03-26T17:24:20Z 2020-03-26T17:24:20Z MEMBER

also, we can't really raise only for ds.loc[...][name] = -1 since for python that is the same as python intermediate_ds = ds.loc[...] intermediate_ds[name] = -1 where the second line is something we explicitly want to support.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assignment 252490115
604543399 https://github.com/pydata/xarray/issues/1519#issuecomment-604543399 https://api.github.com/repos/pydata/xarray/issues/1519 MDEyOklzc3VlQ29tbWVudDYwNDU0MzM5OQ== klapo 6980561 2020-03-26T16:50:44Z 2020-03-26T16:50:44Z NONE

I'm re-pinging this issue since I was just bitten by it (on version 0.15).

If creating an exception is time consuming could we instead have a disclaimer regarding this behavior to the documentation? Here's a basic working example that shows that it does silently fail:

```

Basic working example of the silently failing indexing assignment

ds = xr.Dataset({'a': (('x'), np.arange(4)), 'b': (('x'), np.arange(4)) })

Silently fails assignment

ds.loc[{'x': 1}]['a'] = 10 print(ds)

Works as intended

ds['a'].loc[{'x': 1}] = 10 print(ds) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assignment 252490115

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