home / github / pull_requests

Menu
  • GraphQL API
  • Search all tables

pull_requests: 31092718

This data as json

id node_id number state locked title user body created_at updated_at closed_at merged_at merge_commit_sha assignee milestone draft head base author_association auto_merge repo url merged_by
31092718 MDExOlB1bGxSZXF1ZXN0MzEwOTI3MTg= 372 closed 0 API: new methods {Dataset/DataArray}.swap_dims 1217238 Fixes #276 Exmaple usage: ``` In [8]: ds = xray.Dataset({'x': range(3), 'y': ('x', list('abc'))}) In [9]: ds Out[9]: <xray.Dataset> Dimensions: (x: 3) Coordinates: * x (x) int64 0 1 2 Data variables: y (x) |S1 'a' 'b' 'c' In [10]: ds.swap_dims({'x': 'y'}) Out[10]: <xray.Dataset> Dimensions: (y: 3) Coordinates: * y (y) |S1 'a' 'b' 'c' x (y) int64 0 1 2 Data variables: *empty* ``` This is a slightly more verbose API than strictly necessary, because the new dimension names must be along existing dimensions (e.g., we could spell this `ds.set_dims(['y'])`). But I still think it's a good idea, for two reasons: 1. It's more explicit. Users control know which dimensions are being swapped. 2. It opens up the possibility of specifying new dimensions with dictionary like syntax, e.g., `ds.swap_dims('x': ('y', list('abc')))` CC @aykuznetsova 2015-03-13T01:08:15Z 2015-03-17T15:44:30Z 2015-03-17T15:44:30Z 2015-03-17T15:44:30Z 908965075ddb59fc6c67684813fd41c25b1e4259   1004936 0 4be2e38dd94cdf5310e2eb71f77fbfade7bec4df 48ce8c23c31b9a5d092f29974715aa1888b95044 MEMBER   13221727 https://github.com/pydata/xarray/pull/372  

Links from other tables

  • 2 rows from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 0.612ms