id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1275752720,I_kwDOAMm_X85MCnEQ,6704,Future of `DataArray.rename`,43316012,open,0,,,11,2022-06-18T10:14:43Z,2023-09-11T00:53:31Z,,COLLABORATOR,,,,"### What is your issue? In https://github.com/pydata/xarray/pull/6665 the question came up what to do with `DataArray.rename` in light of the new index refactor. To be consistent with `Dataset` we should introduce a - `DataArray.rename_dims` - `DataArray.rename_vars` - `DataArray.rename` Several open questions about the behavior (Similar things apply to `Dataset.rename{, _dims, _vars}`): - [ ] Should `rename_dims` also rename indexes (dimension coordinates)? - [ ] Should `rename_vars` also rename the DataArray? - [ ] What to do if the `DataArray` has the same name as one of its coordinates? - [ ] Should `rename` still rename everything (like it is now) or only the name (Possibly with some deprecation cycle)? The current implementation of `DataArray.rename` is a bit inconsistent: As stated by @max-sixty in https://github.com/pydata/xarray/issues/6665#issuecomment-1154368202_: - rename operates on DataArray as described in https://github.com/pydata/xarray/pull/6665#issuecomment-1150810485.%C2%A0Generally I'm less keen on ""different types have different semantics"", and here a positional arg would mean a DataArray rename, and kwarg would mean var rename. But it does work locally to DataArray quite well. - rename only exists on DataArrays for the name of the DataArray, and we use rename_vars & rename_dims for both DataArrays & Datasets. So Dataset.rename is soft-deprecated. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6704/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1580266844,PR_kwDOAMm_X85JvlXi,7521,use numpys SupportsDtype,43316012,closed,0,,,11,2023-02-10T20:17:10Z,2023-03-18T14:08:20Z,2023-02-28T23:23:46Z,COLLABORATOR,,0,pydata/xarray/pulls/7521," - [x] Closes #7479 I don't know how I feel about using private numpy classes that might change anytime. Maybe within a if TYPE_CHECKING block it is not too bad? ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7521/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull