Skip to content
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

dim vs dims #6646

Closed
max-sixty opened this issue May 27, 2022 · 4 comments · Fixed by #8982
Closed

dim vs dims #6646

max-sixty opened this issue May 27, 2022 · 4 comments · Fixed by #8982

Comments

@max-sixty
Copy link
Collaborator

What is your issue?

I've recently been hit with this when experimenting with xr.dot and xr.corr — xr.dot takes dims, and xr.cov takes dim. Because they each take multiple arrays as positional args, kwargs are more conventional.

Should we standardize on one of these?

@TomNicholas
Copy link
Member

I've noticed this before and do find it a bit annoying.

@shoyer
Copy link
Member

shoyer commented Jun 22, 2022

It would be helpful to understand if there are also other uses of dim/dims that are inconsistent. Which is the most common pattern?

@shoyer
Copy link
Member

shoyer commented Jun 22, 2022

NumPy mostly uses axis instead of axes, which we could copy.

@max-sixty
Copy link
Collaborator Author

As discussed on the dev call — we can plan to move to dim, with the exception of constructors!

max-sixty added a commit to max-sixty/xarray that referenced this issue Nov 28, 2023
Begins the process of pydata#6646. I don't think it's feasible / enjoyable to do this for everything at once, so I would suggest we do it gradually, while keeping the warnings quite quiet, so by the time we convert to louder warnings, users can do a find/replace easily.
max-sixty added a commit that referenced this issue Nov 28, 2023
* Start renaming `dims` to `dim`

Begins the process of #6646. I don't think it's feasible / enjoyable to do this for everything at once, so I would suggest we do it gradually, while keeping the warnings quite quiet, so by the time we convert to louder warnings, users can do a find/replace easily.

* No deprecation for internal methods

* Simplify typing
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.

3 participants