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/3784#issuecomment-633145887,https://api.github.com/repos/pydata/xarray/issues/3784,633145887,MDEyOklzc3VlQ29tbWVudDYzMzE0NTg4Nw==,56925856,2020-05-23T21:58:49Z,2020-05-23T21:58:49Z,CONTRIBUTOR,"In a fit of covid-induced insanity, I've decided to have a crack at finishing up #3550 ! I'm playing around with the changes made by @r-beer at the moment, but I'm finding the tests quite confusing - I think they're wrong? But maybe someone could help me out with this?
Here's something from `test_computation.py` in #3550
```python
def test_cov(da_a, da_b, dim):
def pandas_cov(ts1, ts2):
""""""Ensure the ts are aligned and missing values ignored""""""
ts1, ts2 = xr.align(ts1, ts2)
valid_values = ts1.notnull() & ts2.notnull()
ts1 = ts1.where(valid_values, drop=True)
ts2 = ts2.where(valid_values, drop=True)
return ts1.to_series().cov(ts2.to_series())
expected = pandas_cov(da_a, da_b)
actual = xr.cov(da_a, da_b, dim)
assert_allclose(actual, expected)
```
What I don't understand is, why would we expect the Pandas covariance or correlation functions to return anything remotely like the output of `xr.cov()`? The line `ts1.to_series().cov(ts2.to_series())` always produces a scalar value, whereas in most reasonable use cases `xr.cov(da_a, da_b, dim)` would be producing a matrix of values (eg. the pixel-wise correlation in time between two `DataArrays`).
I wasn't sure whether to open a PR for this or not? I'm working on it but would require some help to set up some appropriate tests...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,568378007
https://github.com/pydata/xarray/issues/3784#issuecomment-625345337,https://api.github.com/repos/pydata/xarray/issues/3784,625345337,MDEyOklzc3VlQ29tbWVudDYyNTM0NTMzNw==,56925856,2020-05-07T16:02:43Z,2020-05-07T16:02:43Z,CONTRIBUTOR,"Hi @max-sixty, just coming back to this now. It seems @r-beer isn't available...do you know roughly how far away his PR was from completion? I'm getting a little bit lost trying to follow #3550 sorry!
Was the main `todo` to avoid the `drop=True` after broadcasting? Is there any idea about what to do instead? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,568378007
https://github.com/pydata/xarray/issues/3784#issuecomment-589368049,https://api.github.com/repos/pydata/xarray/issues/3784,589368049,MDEyOklzc3VlQ29tbWVudDU4OTM2ODA0OQ==,56925856,2020-02-20T22:08:01Z,2020-02-20T22:08:01Z,CONTRIBUTOR,"@max-sixty Just had a peruse through a few of the relevant issues, do we know what the status of [#3550 ] is? It seems like @r-beer was pretty close on this, right?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,568378007
https://github.com/pydata/xarray/issues/3784#issuecomment-589328765,https://api.github.com/repos/pydata/xarray/issues/3784,589328765,MDEyOklzc3VlQ29tbWVudDU4OTMyODc2NQ==,56925856,2020-02-20T21:32:26Z,2020-02-20T21:32:26Z,CONTRIBUTOR,I'll take a look at them!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,568378007