Skip to content

Rename "coordinates" to "indices"? #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shoyer opened this issue May 27, 2014 · 2 comments · Fixed by #161
Closed

Rename "coordinates" to "indices"? #142

shoyer opened this issue May 27, 2014 · 2 comments · Fixed by #161

Comments

@shoyer
Copy link
Member

shoyer commented May 27, 2014

For users of pandas, the xray interface would be more obvious if we referred to what we currently call "coordinates" as "indices."

This would entail renaming the coordinates property to indices, xray.Coordinate to xray.Index and the xray.Coordinate.as_index property to as_pandas_index (all with deprecation warnings).

Possible downsides:

  1. The xray data model would be less obvious to people familiar with the NetCDF.
  2. There is some potential for confusion between xray.Index and pandas.Index:
    • The only real difference is that xray's Index is a xray.Variable object, and thus is dimension aware and has attributes.
    • In principle, xray.Index should have all the necessary properties to act like an index (or rather, it already has most of these properties and should get the rest).
    • Unfortunately, pandas doesn't accept non-pandas.Index objects as indices, nor will it properly convert an xray.Index into a pandas.Index.
@shoyer shoyer added this to the 0.2 milestone May 27, 2014
@shoyer
Copy link
Member Author

shoyer commented May 29, 2014

Here is a (partial) fix for the pandas issue: pandas-dev/pandas#7270

@shoyer
Copy link
Member Author

shoyer commented Jun 9, 2014

Some research was revealed that both "indices" and "indexes" are valid plural forms for "index": http://english.stackexchange.com/questions/61080/indexes-or-indices

I am inclined to go ahead with this change but will need to decide on if we should use "indexes" or "indices" first.

My inclination is to go for "indexes" since it seems to be more popular in this context: http://www.googlefight.com/index.php?lang=en_GB&word1=%22database+indices%22&word2=%22database+indexes%22

@shoyer shoyer added the API label Jun 9, 2014
shoyer added a commit to shoyer/xarray that referenced this issue Jun 13, 2014
shoyer added a commit that referenced this issue Jun 22, 2014
shoyer added a commit to shoyer/xarray that referenced this issue Jul 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant