home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 531452036

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/3298#issuecomment-531452036 https://api.github.com/repos/pydata/xarray/issues/3298 531452036 MDEyOklzc3VlQ29tbWVudDUzMTQ1MjAzNg== 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
}
  491324262
Powered by Datasette · Queries took 2.664ms · About: xarray-datasette