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/3980#issuecomment-1449013427,https://api.github.com/repos/pydata/xarray/issues/3980,1449013427,IC_kwDOAMm_X85WXjCz,43316012,2023-02-28T22:24:56Z,2023-02-28T22:24:56Z,COLLABORATOR,"I will not be able to join tomorrow, so here are my thoughts on this topic: - How to work with subclassed Datasets that should return DataArrays? I think the pandas approach is good, we add `Dataset.dataarray_cls = DataArray` and `DataArray.dataset_cls = Dataset` which subclasses can overwrite. - How to deal with subclasses that change the constructor aka. `__init__`? Probably we need to introduce a kind of shortcut constructor that will be called instead in functions that create new instances (right now the subclass needs the same constructor signature as xarrays version). But then custom instance attributes will not be set etc. Not sure what is the best approach here. - Is the whole thing limited to DataArrays and Datasets or can one also subclass Variables?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-1448964988,https://api.github.com/repos/pydata/xarray/issues/3980,1448964988,IC_kwDOAMm_X85WXXN8,2448579,2023-02-28T21:46:03Z,2023-02-28T21:49:08Z,MEMBER,"Following this [very long discussion](https://github.com/UXARRAY/uxarray/discussions/185#discussioncomment-4375189) on propagating grid information with Xarray objects, this group wants to [subclass](https://github.com/UXARRAY/uxarray/pull/216) and attach unstructured grid information to their derived classes. I invited them to the meeting tomorrow to discuss a public subclassing interface as proposed here. Come with opinions!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-1402777128,https://api.github.com/repos/pydata/xarray/issues/3980,1402777128,IC_kwDOAMm_X85TnK4o,35968931,2023-01-24T22:30:25Z,2023-01-24T22:30:25Z,MEMBER,@pydata/xarray should this feature be added to our development roadmap? It's arguably another approach to making [more flexible data structures](https://docs.xarray.dev/en/stable/roadmap.html#flexible-data-structures)...,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-1345248318,https://api.github.com/repos/pydata/xarray/issues/3980,1345248318,IC_kwDOAMm_X85QLtw-,43316012,2022-12-10T11:56:02Z,2022-12-10T11:56:02Z,COLLABORATOR,"I think we have made good progress to better support this, only requirement is that the `__init__` method of the subclass has the same syntax as the original xarray implementation. Maybe in the future we can relax this as well and use a shortcut internally. The only thing which probably won't work anytime soon is custom Datasets returning custom DataArrays.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-1345247373,https://api.github.com/repos/pydata/xarray/issues/3980,1345247373,IC_kwDOAMm_X85QLtiN,43316012,2022-12-10T11:50:17Z,2022-12-10T11:50:17Z,COLLABORATOR,"> Does xarray have anything like NumPy's [dispatch mechanism](https://numpy.org/doc/stable/user/basics.dispatch.html#basics-dispatch)? Yes, xarray fully supports this. ","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-1341669884,https://api.github.com/repos/pydata/xarray/issues/3980,1341669884,IC_kwDOAMm_X85P-EH8,1775632,2022-12-07T22:21:48Z,2022-12-07T22:21:48Z,NONE,"Does xarray have anything like NumPy's [dispatch mechanism](https://numpy.org/doc/stable/user/basics.dispatch.html#basics-dispatch)? This would make it relatively easy to encapsulate domain-specific logic inside a wrapper class, rather than a subclass or an accessor namespace.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-1114173635,https://api.github.com/repos/pydata/xarray/issues/3980,1114173635,IC_kwDOAMm_X85CaPDD,847751,2022-05-01T08:46:40Z,2022-05-01T08:46:40Z,NONE,Still relevant,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-616095257,https://api.github.com/repos/pydata/xarray/issues/3980,616095257,MDEyOklzc3VlQ29tbWVudDYxNjA5NTI1Nw==,14808389,2020-04-19T10:15:07Z,2020-04-19T10:15:07Z,MEMBER,There is also #3582 where the recommendation was to wrap instead of subclassing.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021 https://github.com/pydata/xarray/issues/3980#issuecomment-615467263,https://api.github.com/repos/pydata/xarray/issues/3980,615467263,MDEyOklzc3VlQ29tbWVudDYxNTQ2NzI2Mw==,2443309,2020-04-17T21:16:36Z,2020-04-17T21:16:36Z,MEMBER,Thanks @TomNicholas for opening up this issue. Just cross referencing one more issue: https://github.com/pydata/xarray/issues/1097,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,602218021