home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 245778442

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
245778442 MDU6SXNzdWUyNDU3Nzg0NDI= 1492 Slicing inconsistent for coordinates and dimensions without coordinates 14000880 closed 0     3 2017-07-26T16:21:21Z 2019-07-29T01:36:13Z 2019-07-29T01:36:13Z NONE      

This is a new behavior since 0.9 and has broken some of my scripts, I am not sure if this is intentional?

old, before 0.9: ``` ds = xr.Dataset() ds['x'] = (('x'), np.arange(100., 200., 10.)) ds['var1'] = (('x', 'i'), np.random.rand(10, 5))

ds.sel(x=slice(110, 130), i=slice(1, 3)) <xarray.Dataset> Dimensions: (i: 3, x: 3) Coordinates: * x (x) float64 110.0 120.0 130.0 * i (i) int64 1 2 3 Data variables: var1 (x, i) float64 0.8894 0.01157 0.2779 0.7247 0.5809 0.3448 ... ```

new, since 0.9: ``` ds = xr.Dataset() ds['x'] = (('x'), np.arange(100., 200., 10.)) ds['var1'] = (('x', 'i'), np.random.rand(10, 5))

ds.sel(x=slice(110, 130), i=slice(1, 3)) <xarray.Dataset> Dimensions: (i: 2, x: 3) Coordinates: * x (x) float64 110.0 120.0 130.0 Dimensions without coordinates: i Data variables: var1 (x, i) float64 0.9989 0.9092 0.9248 0.296 0.2209 0.5416 ```

Maybe slicing uses the standard (excluding) python slice() for these dimensions and continues to use the (including) pandas slice for coordinates? Anyway, I find this slightly unexpected.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1492/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.822ms · About: xarray-datasette