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/7559#issuecomment-1444208978,https://api.github.com/repos/pydata/xarray/issues/7559,1444208978,IC_kwDOAMm_X85WFOFS,2448579,2023-02-24T18:27:18Z,2023-02-25T03:46:49Z,MEMBER,"> is there anywhere else in xarray where we have made some choice about how to let the user choose between specifying via indexes or labels?
`coarsen` vs `groupby`/`groupby_bins`/`resample`.
I explored this idea in [this tutorial](https://tutorial.xarray.dev/intermediate/01-high-level-computation-patterns.html#xarray-provides-high-level-patterns-in-both-index-space-and-label-space)
I think it may be a fundamental concept for labelled array analysis. You need to pick whether you're working in ""index space"" like unlabelled arrays, or in ""label space"". This also came up in [this issue](https://github.com/pydata/xarray/issues/7558) where `shift` (and `roll`) operate in ""index space"".
Another example: Alignment is in ""label space"", broadcasting seems like ""index space"" (you just change shapes, but it does use dimension names to do that so maybe 50/50).","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 1}",,1599056009
https://github.com/pydata/xarray/issues/7559#issuecomment-1444165475,https://api.github.com/repos/pydata/xarray/issues/7559,1444165475,IC_kwDOAMm_X85WFDdj,35968931,2023-02-24T18:07:08Z,2023-02-24T18:07:08Z,MEMBER,"The `chunk_by_labels` functionality seems quite useful even when not talking about times, so I would be :+1: for that kind of option.
On the API question is there anywhere else in xarray where we have made some choice about how to let the user choose between specifying via indexes or labels? Apart from just `.isel` vs `.sel` I mean","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1599056009