home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 260802408

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/1017#issuecomment-260802408 https://api.github.com/repos/pydata/xarray/issues/1017 260802408 MDEyOklzc3VlQ29tbWVudDI2MDgwMjQwOA== 1217238 2016-11-15T23:20:53Z 2016-11-15T23:21:06Z MEMBER

@crusaderky thanks for giving this a try!

RE: missing dimension in the repr

I like the idea of mirroring * from the coordinate list in the list of dimensions.

I'm less sure about adding markers for empty dimensions to coordinates. That makes for a much longer repr for some simple examples, e.g.,

<xarray.DataArray (x: 3, y: 4)> array([[ 0.8167696 , 0.15151986, 0.81139993, 0.33878428], [ 0.96861902, 0.34231084, 0.55831466, 0.92723981], [ 0.16737575, 0.32391949, 0.39093643, 0.64267858]])

vs

<xarray.DataArray (x: 3, y: 4)> array([[ 0.8167696 , 0.15151986, 0.81139993, 0.33878428], [ 0.96861902, 0.34231084, 0.55831466, 0.92723981], [ 0.16737575, 0.32391949, 0.39093643, 0.64267858]]) Coordinates: * x (x) - * y (y) -

RE: drop

I understand the annoyance of v1.sel(somedim=somevalue).drop('somedim') no longer working. Unfortunately, I don't think we can make drop handle former dimensions differently, because after v1.sel(somedim=somevalue) we no longer have any representation of the fact that the dimension was indexed in the xarray data model.

What we could do is add a separate discard method (sort of like set.discard), which works like drop but ignores missing labels instead of raising an error.

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