home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 410407863

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/2340#issuecomment-410407863 https://api.github.com/repos/pydata/xarray/issues/2340 410407863 MDEyOklzc3VlQ29tbWVudDQxMDQwNzg2Mw== 90008 2018-08-04T00:32:20Z 2018-08-04T03:15:55Z CONTRIBUTOR

@shoyer thank you for the quick response.

My old thinking I gave a really simplistic example, but `my_slice` is also technically scalar, but contains information that it has many non-dimensional coordinates. It is still able to understand that it should expand along those dimensions. and retain their values. `z` should understand that it needs to keep its value for that non-dimensional coordinate when it gets promoted to a dimensional coordinate. I'm not convinced that this is the expected behaviour. The xarray structure seems to understand that the coordinates have coordinates (though read below I think there is a bug there too). Something else peculiar that I found was: Before slicing, `y` doesn't have additional coordinates: ```python data['y'] Out[38]: <xarray.DataArray 'y' (y: 3)> array([0, 1, 2]) Coordinates: * y (y) int32 0 1 2 ``` but after slicing: ```python data[{'x':1}]['y'] Out[39]: <xarray.DataArray 'y' (y: 3)> array([0, 1, 2]) Coordinates: * y (y) int32 0 1 2 x int32 1 z (y) int32 1 3 5 ``` All of a sudden, `y` has inherited all of the coordinates from the top level array.
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  347558405
Powered by Datasette · Queries took 0.818ms · About: xarray-datasette