home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 491324262 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

  • shoyer 2
  • max-sixty 2
  • griverat 2
  • jhamman 1

author_association 2

  • MEMBER 5
  • CONTRIBUTOR 2

issue 1

  • Accept int value in head, thin and tail · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
531540757 https://github.com/pydata/xarray/pull/3298#issuecomment-531540757 https://api.github.com/repos/pydata/xarray/issues/3298 MDEyOklzc3VlQ29tbWVudDUzMTU0MDc1Nw== jhamman 2443309 2019-09-15T07:05:58Z 2019-09-15T07:05:58Z MEMBER

@DangoMelon - thanks for your contribution. This will get used a lot!

{
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 2,
    "rocket": 0,
    "eyes": 0
}
  Accept int value in head, thin and tail 491324262
531516313 https://github.com/pydata/xarray/pull/3298#issuecomment-531516313 https://api.github.com/repos/pydata/xarray/issues/3298 MDEyOklzc3VlQ29tbWVudDUzMTUxNjMxMw== shoyer 1217238 2019-09-14T21:46:22Z 2019-09-14T21:46:22Z MEMBER

thanks @DangoMelon !

{
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 2,
    "rocket": 0,
    "eyes": 0
}
  Accept int value in head, thin and tail 491324262
531514808 https://github.com/pydata/xarray/pull/3298#issuecomment-531514808 https://api.github.com/repos/pydata/xarray/issues/3298 MDEyOklzc3VlQ29tbWVudDUzMTUxNDgwOA== griverat 23618263 2019-09-14T21:18:35Z 2019-09-14T21:18:35Z CONTRIBUTOR

@shoyer I hope it's much clear now, I tried to phrase what you suggested. @max-sixty That did the trick! Thank you both for your suggestions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Accept int value in head, thin and tail 491324262
531478548 https://github.com/pydata/xarray/pull/3298#issuecomment-531478548 https://api.github.com/repos/pydata/xarray/issues/3298 MDEyOklzc3VlQ29tbWVudDUzMTQ3ODU0OA== max-sixty 5635139 2019-09-14T13:08:45Z 2019-09-14T13:08:45Z MEMBER

Here's a solution to the mypy issue:

```diff diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 1d762114..ee4ebf4d 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -2046,8 +2046,8 @@ class Dataset(Mapping, ImplementsDatasetReduce, DataWithCoords): raise TypeError("indexer value must be an integer") elif v < 0: raise ValueError("indexer value must be positive") - indexers = {k: slice(val) for k, val in indexers.items()} - return self.isel(indexers) + indexers_slices = {k: slice(val) for k, val in indexers.items()} + return self.isel(indexers_slices)

 def tail(
     self,

@@ -2087,11 +2087,11 @@ class Dataset(Mapping, ImplementsDatasetReduce, DataWithCoords): raise TypeError("indexer value must be an integer") elif v < 0: raise ValueError("indexer value must be positive") - indexers = { + indexers_slices = { k: slice(-val, None) if val != 0 else slice(val) for k, val in indexers.items() } - return self.isel(indexers) + return self.isel(indexers_slices)

 def thin(
     self,

@@ -2134,8 +2134,8 @@ class Dataset(Mapping, ImplementsDatasetReduce, DataWithCoords): raise ValueError("indexer value must be positive") elif v == 0: raise ValueError("step cannot be zero") - indexers = {k: slice(None, None, val) for k, val in indexers.items()} - return self.isel(indexers) + indexers_slices = {k: slice(None, None, val) for k, val in indexers.items()} + return self.isel(indexers_slices)

 def broadcast_like(
     self, other: Union["Dataset", "DataArray"], exclude: Iterable[Hashable] = None

```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Accept int value in head, thin and tail 491324262
531452036 https://github.com/pydata/xarray/pull/3298#issuecomment-531452036 https://api.github.com/repos/pydata/xarray/issues/3298 MDEyOklzc3VlQ29tbWVudDUzMTQ1MjAzNg== shoyer 1217238 2019-09-14T05:46:45Z 2019-09-14T05:46:45Z MEMBER

I would try to include value in the message, too, which can often be a useful hint about what went wrong, e.g., “expected positive integer for dimension ‘x’, got -1”

On Fri, Sep 13, 2019 at 8:56 PM Gerardo Rivera notifications@github.com wrote:

@DangoMelon commented on this pull request.

In xarray/core/dataset.py https://github.com/pydata/xarray/pull/3298#discussion_r324411117:

     indexers = either_dict_or_kwargs(indexers, indexers_kwargs, "head")
  • for v in indexers.values():
  • if not isinstance(v, int):
  • raise TypeError("indexer value must be an integer")
  • elif v < 0:
  • raise ValueError("indexer value must be positive")

Hmmm, Something along these lines maybe?

"expected integer as indexer value, found type %r for dim %r" % (type(v), k)

and

"expected positive integer as indexer value for dim %r" % k

The k and v come from iterating over indexers.items()

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/pull/3298?email_source=notifications&email_token=AAJJFVVWFOWK5LYL33Z6Q4DQJROHDA5CNFSM4IVADGGKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCEXTGGA#discussion_r324411117, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJJFVRJWPWIG5XBDWEPRMLQJROHDANCNFSM4IVADGGA .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Accept int value in head, thin and tail 491324262
531445217 https://github.com/pydata/xarray/pull/3298#issuecomment-531445217 https://api.github.com/repos/pydata/xarray/issues/3298 MDEyOklzc3VlQ29tbWVudDUzMTQ0NTIxNw== griverat 23618263 2019-09-14T03:44:34Z 2019-09-14T03:44:34Z CONTRIBUTOR

Any other feedback before we merge? (Errors are unrelated)

@max-sixty I think the typing errors are due to changing the Any to int and actually finding slice.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Accept int value in head, thin and tail 491324262
531036946 https://github.com/pydata/xarray/pull/3298#issuecomment-531036946 https://api.github.com/repos/pydata/xarray/issues/3298 MDEyOklzc3VlQ29tbWVudDUzMTAzNjk0Ng== max-sixty 5635139 2019-09-12T22:53:36Z 2019-09-12T22:53:36Z MEMBER

Any other feedback before we merge? (Errors are unrelated)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Accept int value in head, thin and tail 491324262

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