home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 348536836

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/issues/1755#issuecomment-348536836 https://api.github.com/repos/pydata/xarray/issues/1755 348536836 MDEyOklzc3VlQ29tbWVudDM0ODUzNjgzNg== 25015426 2017-12-01T16:14:43Z 2017-12-01T16:14:43Z CONTRIBUTOR

Seems like I forgot a confusing line in my example. For example in dataarray_accessor, we have a need for in-place swap. python cube = xr.DataArray(arr, dims=['ya', 'x', 'y'], coords={'y':[1,3], 'ya':[1,2,3,6], 'x':[1,2,5]}) #First dataarray object. cube now referes to this. cube.coords['x2'] = ('x', [1,2,3]) cube = cube.swap_dims({'x':'x2'}) #Second dataarray object. cube now refers to this and first dataarray object is now forgotten vs: python cube = xr.DataArray(arr, dims=['ya', 'x', 'y'], coords={'y':[1,3], 'ya':[1,2,3,6], 'x':[1,2,5]}) #First dataarray object. cube now referes to this. cube.coords['x2'] = ('x', [1,2,3]) cube.swap_dims({'x':'x2'}, inline=True) #This just changes the first dataarray object. cube still refers to the first dataarray object

So the question again was, is there a reason, why the inline keyword is implemented on dataset, but not on dataarray.

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