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-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