issue_comments: 487999904
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/2931#issuecomment-487999904 | https://api.github.com/repos/pydata/xarray/issues/2931 | 487999904 | MDEyOklzc3VlQ29tbWVudDQ4Nzk5OTkwNA== | 35968931 | 2019-04-30T15:32:18Z | 2019-04-30T15:32:18Z | MEMBER | So in xarray coordinates which have the same name as dimensions are given special status - they are known as "dimension coordinates". (Yes this is confusing and I think there are plans to make this structure clearer in the future.) Dimension coordinates have to be 1D along the corresponding dimension, as indicated by the error message. However in your example you didn't specify the dimension which you want the coordinate ```python import xarray as xr import pandas as p import numpy as np var1 = np.ones((364)) tt1=p.date_range('1/1/2018','12/30/2018') tt1.name= 'time1_name' var=xr.Dataset( data_vars={ 'var1':(('mytime1'),var1), }, coords={ 'mytime1':(('mytime1'), tt1), } ) ``` which when printed gives
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
438590881 |