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/722#issuecomment-269566818,https://api.github.com/repos/pydata/xarray/issues/722,269566818,MDEyOklzc3VlQ29tbWVudDI2OTU2NjgxOA==,2443309,2016-12-29T01:12:16Z,2016-12-29T01:12:16Z,MEMBER,I'm closing since #1017 has moved us past this question.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,128528319 https://github.com/pydata/xarray/issues/722#issuecomment-177036258,https://api.github.com/repos/pydata/xarray/issues/722,177036258,MDEyOklzc3VlQ29tbWVudDE3NzAzNjI1OA==,1217238,2016-01-30T01:06:16Z,2016-01-30T01:06:16Z,MEMBER,"Yes, xarray checks for ""trivial indexes"" that are equivalent to what it would create automatically when it writes a file to disk: https://github.com/pydata/xarray/blob/v0.7.0/xarray/backends/common.py#L31-L47 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,128528319 https://github.com/pydata/xarray/issues/722#issuecomment-176884522,https://api.github.com/repos/pydata/xarray/issues/722,176884522,MDEyOklzc3VlQ29tbWVudDE3Njg4NDUyMg==,242610,2016-01-29T17:48:15Z,2016-01-29T17:48:15Z,NONE,"Thank you! I was just wondering how you know then, which one is an ""actual"" coordinate and which one is an indexed (""default"") coordinate? xarray seem to know this. Example: ``` In [1]: import xray as xr In [2]: import numpy as np In [3]: var1 = xr.DataArray(np.array([1, 2], np.float64), coords=[np.array([1, 2], np.int64)], dims=[""coor1"",], name = ""var1"") In [4]: var2 = xr.DataArray(np.array([3, 4], np.float64), dims=[""dim1"",], name = ""var2"") In [5]: ds.var1 Out[5]: array([ 1., 2.]) Coordinates: * coor1 (coor1) int64 1 2 In [6]: ds.var2 Out[6]: array([ 3., 4.]) Coordinates: * dim1 (dim1) int64 0 1 In [7]: ds.var1.coords Out[7]: Coordinates: * coor1 (coor1) int64 1 2 In [8]: ds.var2.coords Out[8]: Coordinates: * dim1 (dim1) int64 0 1 In [9]: ds.to_netcdf(""/tmp/from_xr.nc"") ``` And then ``` $ ncdump /tmp/from_xr.nc netcdf from_xr { dimensions: coor1 = 2 ; dim1 = 2 ; variables: int64 coor1(coor1) ; double var1(coor1) ; double var2(dim1) ; data: coor1 = 1, 2 ; var1 = 1, 2 ; var2 = 3, 4 ; } ``` As `dim1` is not written in the file, xarray somehow knows? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,128528319 https://github.com/pydata/xarray/issues/722#issuecomment-174543016,https://api.github.com/repos/pydata/xarray/issues/722,174543016,MDEyOklzc3VlQ29tbWVudDE3NDU0MzAxNg==,1217238,2016-01-25T15:26:38Z,2016-01-25T15:26:38Z,MEMBER,"This is definitely intended behavior: if you don't supply a coordinate to label points along a dimension, a default coordinate (equivalently to `range(n)`) is created for you. This is somewhat similar to pandas. Looking through the docs, though, it looks like we never state this explicitly... ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,128528319