home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 314154076

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/1472#issuecomment-314154076 https://api.github.com/repos/pydata/xarray/issues/1472 314154076 MDEyOklzc3VlQ29tbWVudDMxNDE1NDA3Ng== 3698640 2017-07-10T16:08:30Z 2017-07-10T16:08:30Z CONTRIBUTOR

I wasn't misled by the docs, just by my intuition. But now that you've made the distinction between '2012' and '2012-12-31' this totally makes sense:

```python In [24]: arr.sel(time='2012') Out[24]: <xarray.DataArray (time: 1, age: 4)> array([[ 0.244146, 0.702819, 0.06614 , 0.211758]]) Coordinates: * age (age) object 'age0' 'age1' 'age2' 'age3' * time (time) datetime64[ns] 2012-12-31

In [25]: arr.sel(time='2012-12-31') Out[25]: <xarray.DataArray (age: 4)> array([ 0.244146, 0.702819, 0.06614 , 0.211758]) Coordinates: * age (age) object 'age0' 'age1' 'age2' 'age3' time datetime64[ns] 2012-12-31

In [26]: arr.sel(time=np.datetime64('2012-12-31')) Out[26]: <xarray.DataArray (age: 4)> array([ 0.244146, 0.702819, 0.06614 , 0.211758]) Coordinates: * age (age) object 'age0' 'age1' 'age2' 'age3' time datetime64[ns] 2012-12-31 ```

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