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/6791#issuecomment-1185946473,https://api.github.com/repos/pydata/xarray/issues/6791,1185946473,IC_kwDOAMm_X85GsBtp,90008,2022-07-15T21:11:19Z,2022-09-12T22:48:50Z,CONTRIBUTOR,"I guess the code:
```python
import xarray as xr
dataset = xr.Dataset()
my_variable = np.asarray(dataset.get('my_variable', np.asarray(1.0)))
```
coerces things as an array.
Talking things out made me find this one. Though it doesn't read very well.
Feel free to close.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1306457778
https://github.com/pydata/xarray/issues/6791#issuecomment-1185952804,https://api.github.com/repos/pydata/xarray/issues/6791,1185952804,IC_kwDOAMm_X85GsDQk,14808389,2022-07-15T21:20:06Z,2022-07-16T10:25:55Z,MEMBER,"wouldn't you be able to use `getattr` for that? `None` does not have a attribute named `data`, so this should work:
```python
getattr(my_variable, ""data"", np.asarray(1.0))
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1306457778
https://github.com/pydata/xarray/issues/6791#issuecomment-1186019342,https://api.github.com/repos/pydata/xarray/issues/6791,1186019342,IC_kwDOAMm_X85GsTgO,90008,2022-07-15T23:23:30Z,2022-07-15T23:23:30Z,CONTRIBUTOR,Interesting.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1306457778