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/pull/6239#issuecomment-1031635633,https://api.github.com/repos/pydata/xarray/issues/6239,1031635633,IC_kwDOAMm_X849fYKx,10194086,2022-02-07T16:04:31Z,2022-02-07T16:04:31Z,MEMBER,"Define ```python class BackendArray(...): @property def shape(self) -> tuple(int, ...): return self._shape ``` and then set ```python class SpecificBackend(BackendArray): def __init__(self, variable_name, datastore): self._shape = array.shape ``` but that might affect downstream libraries. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1124879701 https://github.com/pydata/xarray/pull/6239#issuecomment-1031573595,https://api.github.com/repos/pydata/xarray/issues/6239,1031573595,IC_kwDOAMm_X849fJBb,14371165,2022-02-07T15:11:48Z,2022-02-07T15:11:48Z,MEMBER,"> I think `BackendArray` (and it's parents) did not define `shape` as an attribute. So one option is to revert this change. Yeah this approach isn't working that great. I think I'll close this pr unless there's some other ideas.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1124879701 https://github.com/pydata/xarray/pull/6239#issuecomment-1031335864,https://api.github.com/repos/pydata/xarray/issues/6239,1031335864,IC_kwDOAMm_X849eO-4,10194086,2022-02-07T10:57:41Z,2022-02-07T10:57:41Z,MEMBER,"I think `BackendArray` (and it's parents) did not define `shape` as an attribute. So one option is to revert this change. --- The other is to unify how the backends assign `shape` and `dtype`? They seem be to defined very differently depending on the backend. https://github.com/pydata/xarray/blob/d47cf0c850cb70429373782b3c1e0329d14fd05a/xarray/backends/pydap_.py#L28-L30 https://github.com/pydata/xarray/blob/d47cf0c850cb70429373782b3c1e0329d14fd05a/xarray/backends/netCDF4_.py#L59 https://github.com/pydata/xarray/blob/d47cf0c850cb70429373782b3c1e0329d14fd05a/xarray/backends/rasterio_.py#L37 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1124879701 https://github.com/pydata/xarray/pull/6239#issuecomment-1030708990,https://api.github.com/repos/pydata/xarray/issues/6239,1030708990,IC_kwDOAMm_X849b17-,14371165,2022-02-05T22:29:27Z,2022-02-05T22:36:55Z,MEMBER,"The errors looks like this: ```python self = variable_name = 'dim2' datastore = def __init__(self, variable_name, datastore): self.datastore = datastore self.variable_name = variable_name array = self.get_variable().data > self.shape = array.shape E AttributeError: can't set attribute /home/runner/work/xarray/xarray/xarray/backends/scipy_.py:52: AttributeError ``` Setting shape like this doesn't seem like the proper way of doing it. Maybe these should just inherit NDArrayMixin as well?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1124879701 https://github.com/pydata/xarray/pull/6239#issuecomment-1030589937,https://api.github.com/repos/pydata/xarray/issues/6239,1030589937,IC_kwDOAMm_X849bY3x,14371165,2022-02-05T09:41:24Z,2022-02-05T09:41:24Z,MEMBER,pre-commit.ci autofix,"{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,1124879701