Terminology for the various coordinates
See original GitHub issuePicking up a thread about the repr
(https://github.com/pydata/xarray/issues/1199#issuecomment-272824929), I think it would be good to give a name to the two different types of coordinates in xarray.
Currently the doc says:
One dimensional coordinates with a name equal to their sole dimension (marked by * when printing a dataset or data array) take on a special meaning in xarray. They are used for label based indexing and alignment, like the index found on a pandas DataFrame or Series. Indeed, these “dimension” coordinates use a pandas.Index internally to store their values.
Other than for indexing, xarray does not make any direct use of the values associated with coordinates. Coordinates with names not matching a dimension are not used for alignment or indexing, nor are they required to match when doing arithmetic (see Coordinates).
The use of quotation marks in “dimension” coordinates
makes the term imprecise. Should we simply call the former dimension coordinates
and the latter optional coordinates
?
This would also help to uniformize error reporting (e.g. https://github.com/pydata/xarray/pull/1291#discussion_r104261803)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
I don’t feel very strongly about this…just pointing out that CF conventions do define terminology relevant to this discussion.
I’m fine with departing from CF convention terminology where we think it is unnecessarily confusing. But we should try to explain how and why we depart in the docs. @shoyer’s comment above would in fact be a useful addition to the docs.
I agree that “auxiliary coordinate” is a better name, but I think “non-dimension coordinate” is clearer for the rare cases where we want to refer to these coordinates, given that we don’t have any name for these coordinates in the xarray data model itself.