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/3176#issuecomment-522350359,https://api.github.com/repos/pydata/xarray/issues/3176,522350359,MDEyOklzc3VlQ29tbWVudDUyMjM1MDM1OQ==,5635139,2019-08-18T19:56:19Z,2019-08-18T19:56:19Z,MEMBER,"Good work on finding that issue. I think even if we can get something brief in, that would be helpful.
On the specific definitions:
> What do you think of the terminology ""alternative"" or ""auxiliary"" dimension? `a` is clearly a dimension in the sense that it has coordinates or labels for all the ""tick marks"" along the `x` dimension.
For me 'dimension' has a precise definition from traditional sciences, so having our 'coordinate' be an additional / auxiliary / alternative dimension wouldn't be consistent with that (e.g. a 4-dimensional array would still be 4 dimensional regardless of how many coordinates it had).
> At the very least, I'd love to add a lot more examples of how to actually use these things.
👍
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,476103888
https://github.com/pydata/xarray/issues/3176#issuecomment-522344162,https://api.github.com/repos/pydata/xarray/issues/3176,522344162,MDEyOklzc3VlQ29tbWVudDUyMjM0NDE2Mg==,2818208,2019-08-18T18:27:15Z,2019-08-18T18:27:15Z,CONTRIBUTOR,Looks like the idea of a glossary is already being discussed in https://github.com/pydata/xarray/issues/2410.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,476103888
https://github.com/pydata/xarray/issues/3176#issuecomment-521980573,https://api.github.com/repos/pydata/xarray/issues/3176,521980573,MDEyOklzc3VlQ29tbWVudDUyMTk4MDU3Mw==,2818208,2019-08-16T11:39:56Z,2019-08-16T11:39:56Z,CONTRIBUTOR,"Thanks for these answers! On a related point, I'd be keen to open a PR for improved documentation for whatever object `a` is. It seems like the documented Xarray terminology is ""multidimensional coordinate"", right? To me, ""non-index coordinate"" and ""multidimensional coordinate"" are both pretty vague until you're more familiar with Xarray's way of thinking.
What do you think of the terminology ""alternative"" or ""auxiliary"" dimension? `a` is clearly a dimension in the sense that it has coordinates or labels for all the ""tick marks"" along the `x` dimension. At the very least, I'd love to add a lot more examples of how to actually use these things.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,476103888
https://github.com/pydata/xarray/issues/3176#issuecomment-521827695,https://api.github.com/repos/pydata/xarray/issues/3176,521827695,MDEyOklzc3VlQ29tbWVudDUyMTgyNzY5NQ==,5635139,2019-08-15T23:06:48Z,2019-08-15T23:06:48Z,MEMBER,"> Looking at this now, and I'm a little surprised at the verbiage. In your example, do you consider a to be a ""variable""? I thought variables were individual DataArray objects ""inside"" Dataset objects. My colleagues and I have been referring to objects such as a as ""alternative"" or ""auxiliary"" dimensions. Basically, a different labeling of the same coordinates. You also seem to call these ""multidimensional coordinates""?
You're not alone; the proliferation and overlap of terms can be confusing at the least. Maybe we should have a glossary somewhere. Briefly:
- Dimensions are like `x` & `y` above (`a` is _not_ a dimension)
- Coordinates are labels along dimensions. These can be either index or non-index coordinates. `a` above is an non-index coordinate; `x` & `y` are indexes. Currently indexes are always named the same as their dimension.
- (not 100% sure about this one, @pydata/xarray correct me where I'm wrong) Data Variables are indeed the objects inside a dataset. _All_ the objects are Variables, including Coordinates.
> But I do think I see the use case. The point is that you can take an existing dimension's coordinates and set them as the coordinates for an alternative dimension?
💯 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,476103888
https://github.com/pydata/xarray/issues/3176#issuecomment-521822644,https://api.github.com/repos/pydata/xarray/issues/3176,521822644,MDEyOklzc3VlQ29tbWVudDUyMTgyMjY0NA==,2818208,2019-08-15T22:42:07Z,2019-08-15T22:42:07Z,CONTRIBUTOR,"Looking at this now, and I'm a little surprised at the verbiage. In your example, do you consider `a` to be a ""variable""? I thought variables were individual `DataArray` objects ""inside"" `Dataset` objects. My colleagues and I have been referring to objects such as `a` as ""alternative"" or ""auxiliary"" dimensions. Basically, a different labeling of the same coordinates. You also seem to call these [""multidimensional coordinates""](https://xarray.pydata.org/en/stable/examples/multidimensional-coords.html)?
But I do think I see the use case. The point is that you can take an existing dimension's coordinates and set them as the coordinates for an alternative dimension?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,476103888
https://github.com/pydata/xarray/issues/3176#issuecomment-521554109,https://api.github.com/repos/pydata/xarray/issues/3176,521554109,MDEyOklzc3VlQ29tbWVudDUyMTU1NDEwOQ==,2818208,2019-08-15T08:05:39Z,2019-08-15T08:05:39Z,CONTRIBUTOR,Thanks for the explanation. I'll create a PR and link to this issue this evening.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,476103888
https://github.com/pydata/xarray/issues/3176#issuecomment-518674048,https://api.github.com/repos/pydata/xarray/issues/3176,518674048,MDEyOklzc3VlQ29tbWVudDUxODY3NDA0OA==,5635139,2019-08-06T13:40:28Z,2019-08-06T13:40:28Z,MEMBER,"Thanks for the issue @gwgundersen
I think the docs are potentially a bit unclear, and maybe the error message. The existing intention of `set_index` is to set existing variables as indexes, rather than creating new ones. For example, to extend your case:
```python
In [16]: arr = xr.DataArray(data=np.ones((2, 3)), dims=['x', 'y'], coords={'x': range(2), 'y': range(3), 'a': ('x', [3,4])})
In [17]: arr
Out[17]:
array([[1., 1., 1.],
[1., 1., 1.]])
Coordinates:
* x (x) int64 0 1
* y (y) int64 0 1 2
a (x) int64 3 4
In [18]: arr.set_index(x='a')
Out[18]:
array([[1., 1., 1.],
[1., 1., 1.]])
Coordinates:
* x (x) int64 3 4
* y (y) int64 0 1 2
```
We'd definitely be keen on a PR improving the error message (i.e. something like `'a' is not the name of an existing variable`), and v open to feedback on the docs & the method's functionality; let us know if you'd be interested in that PR.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,476103888