home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 146082141

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/608#issuecomment-146082141 https://api.github.com/repos/pydata/xarray/issues/608 146082141 MDEyOklzc3VlQ29tbWVudDE0NjA4MjE0MQ== 1217238 2015-10-07T05:42:07Z 2015-10-07T05:42:07Z MEMBER

Maybe instead of the complex fallback logic to handle specifying x and/or y, we should rewrite this to only handle two cases: 1. Both x and y are provided explicitly. They can be any coordinate variables. 2. Neither x nor y is provided, so use dims to provide default values.

Something like this...

python def _infer_xy_labels(plotfunc, darray, x, y): if x is None and y is None: if darray.ndim != 2: raise ValueError('must be 2d') x, y = darray.dims elif x is None or y is None: raise ValueError('cannot supply only one of x and y') elif any(k not in darray.coords for k in (x, y)): raise ValueError('x and y must be coordinate variables') return x, y

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  109665577
Powered by Datasette · Queries took 0.891ms · About: xarray-datasette