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/4089#issuecomment-633590099,https://api.github.com/repos/pydata/xarray/issues/4089,633590099,MDEyOklzc3VlQ29tbWVudDYzMzU5MDA5OQ==,10194086,2020-05-25T14:08:35Z,2020-05-25T14:08:35Z,MEMBER,"If you insist ;)
```
da_a -= da_a.mean(dim=dim)
```
is indeed marginally faster. As they are already aligned, we don't have to worry about this.","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,623751213
https://github.com/pydata/xarray/pull/4089#issuecomment-633449839,https://api.github.com/repos/pydata/xarray/issues/4089,633449839,MDEyOklzc3VlQ29tbWVudDYzMzQ0OTgzOQ==,10194086,2020-05-25T08:29:22Z,2020-05-25T08:29:22Z,MEMBER,"Could you also add a test for the `TypeError`?
```python
with raises_regex(TypeError, ""Only xr.DataArray is supported""):
xr.corr(xr.Dataset(), xr.Dataset())
```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,623751213
https://github.com/pydata/xarray/pull/4089#issuecomment-633299554,https://api.github.com/repos/pydata/xarray/issues/4089,633299554,MDEyOklzc3VlQ29tbWVudDYzMzI5OTU1NA==,10194086,2020-05-24T21:04:03Z,2020-05-24T21:04:03Z,MEMBER,"Currently `corr` needs to sanitize the inputs twice, which will be inefficient. One way around this is to define an internal method which can do both, depending on a `method` keyword (no need to write extra tests for this IMHO):
```python
def corr(da_a, da_b, dim=None, ddof=0):
return _cov_corr(da_a, da_b, dim=None, ddof=0, method=""corr"")
def cov(da_a, da_b, dim=None, ddof=0):
return _cov_corr(da_a, da_b, dim=None, ddof=0, method=""cov"")
def _cov_corr(da_a, da_b, dim=None, ddof=0, method=None):
# compute cov
if method = ""cov"":
return cov
# compute corr
return corr
```
Maybe you could use `xr.apply_ufunc` instead of looping in the tests (might be overkill).","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,623751213