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/3550#issuecomment-633652253,https://api.github.com/repos/pydata/xarray/issues/3550,633652253,MDEyOklzc3VlQ29tbWVudDYzMzY1MjI1Mw==,5635139,2020-05-25T16:57:04Z,2020-05-25T16:57:04Z,MEMBER,@r-beer in case you come back to see this: thank you for taking it so far; your code was helpful to eventually getting this feature in. And we'd of course appreciate any additional contributions. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-557833141,https://api.github.com/repos/pydata/xarray/issues/3550,557833141,MDEyOklzc3VlQ29tbWVudDU1NzgzMzE0MQ==,5635139,2019-11-23T21:10:37Z,2019-11-23T21:10:37Z,MEMBER,"> Either way, it would be good to have a clear list of `da_a` and `da_b` and respective `expected` results. I am a bit confused about what we actually would expect for `xarray.DataArray([[1, 2], [np.nan, np.nan]], dims=['x', 'y'])`.
For `xarray.corr(array, array, dim='y')`, I think we'd expect an array of the same dimensionality as below, with one point as the correlation of 1.0 (because `{1,2}` is 100% correlated to `{1,2}`) and another `NaN`. Does that make sense?
```
In [17]: xr.dot(da,da, dims='y')
Out[17]:
array([ 5., nan])
Dimensions without coordinates: x
```
","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-557832407,https://api.github.com/repos/pydata/xarray/issues/3550,557832407,MDEyOklzc3VlQ29tbWVudDU1NzgzMjQwNw==,5635139,2019-11-23T21:00:12Z,2019-11-23T21:00:12Z,MEMBER,"> > @shoyer good spot, thanks
> > @r-beer we could add that as a test case
>
> Yes, I will add it.
>
> Thinking about test arrays in general:
> Wouldn't it be good to define some data array fixtures in the `conftest.py` which can then be used in all different `test_function.py` tests?
I think we could do more of this, yes. It's a tradeoff between (a) better sharing & performance vs. (b) customization for each function & localization of effects.
We have `def create_test_data` in a few files, before we used pytest, so could convert some of the usages to fixtures.
@shoyer and I discussed this briefly with @keewis 's work on tests for units. I think @shoyer is keener on having fixture-like code close to the test functions.
> In view of the additional test I started to restructure the `test_cov` and `test_corr` to a single `test_func`. I am now asking myself how much of the data preprocessing shall go to the parametrization and how much remains in the test function...
>
> Any guidelines or suggestions?
I would start with having the code in the function; i.e. don't abstract too early unless we're really confident on the eventual state. When we find ourselves something multiple times, then we can start pulling it out into more abstractions (e.g. fixtures).","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-557824109,https://api.github.com/repos/pydata/xarray/issues/3550,557824109,MDEyOklzc3VlQ29tbWVudDU1NzgyNDEwOQ==,5635139,2019-11-23T19:02:53Z,2019-11-23T19:02:53Z,MEMBER,"@shoyer good spot, thanks
@r-beer we could add that as a test case","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-557808929,https://api.github.com/repos/pydata/xarray/issues/3550,557808929,MDEyOklzc3VlQ29tbWVudDU1NzgwODkyOQ==,5635139,2019-11-23T15:51:48Z,2019-11-23T15:51:48Z,MEMBER,@r-beer great list of future PRs!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-557807868,https://api.github.com/repos/pydata/xarray/issues/3550,557807868,MDEyOklzc3VlQ29tbWVudDU1NzgwNzg2OA==,5635139,2019-11-23T15:38:17Z,2019-11-23T15:38:17Z,MEMBER,"@shoyer take a glance if you get a second. I'm deliberately pushing this through even though https://github.com/pydata/xarray/pull/3550/files#diff-293280a1ed0154c9fb35b842f69e7e33R1112 isn't resolved, since I think these are important features which have dragged for years, and we can iterate on the performance (and @r-beer has done a great job on his first PR!)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-556492208,https://api.github.com/repos/pydata/xarray/issues/3550,556492208,MDEyOklzc3VlQ29tbWVudDU1NjQ5MjIwOA==,5635139,2019-11-20T22:34:14Z,2019-11-20T22:34:14Z,MEMBER,"> Oh, ok. I thought I have to create `xarray-docs` to update `whats-new.rst` and `api.rst`?
You can just edit the files directly! No need to build all the docs. It should be much simpler than the work you've already done!
(lmk if the docs were unclear and we can update)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-556477633,https://api.github.com/repos/pydata/xarray/issues/3550,556477633,MDEyOklzc3VlQ29tbWVudDU1NjQ3NzYzMw==,5635139,2019-11-20T22:20:35Z,2019-11-20T22:20:35Z,MEMBER,@r-beer let's go with @shoyer 's suggestion to change this from a method to a function `xr.cov` & `xr.corr`. Is that OK?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-556476893,https://api.github.com/repos/pydata/xarray/issues/3550,556476893,MDEyOklzc3VlQ29tbWVudDU1NjQ3Njg5Mw==,5635139,2019-11-20T22:19:54Z,2019-11-20T22:19:54Z,MEMBER,"> I am now looking into the generation of the documentation.
What do you mean by this? You shouldn't have to generate anything locally?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-556415424,https://api.github.com/repos/pydata/xarray/issues/3550,556415424,MDEyOklzc3VlQ29tbWVudDU1NjQxNTQyNA==,5635139,2019-11-20T21:23:39Z,2019-11-20T21:23:39Z,MEMBER,"@r-beer your current test case looks fine, no stress on the fixtures!","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-556413367,https://api.github.com/repos/pydata/xarray/issues/3550,556413367,MDEyOklzc3VlQ29tbWVudDU1NjQxMzM2Nw==,5635139,2019-11-20T21:21:46Z,2019-11-20T21:21:46Z,MEMBER,"One question we started discussing on the old PR which we should resolve ASAP given @r-beer 's work: do we want `xr.cov(da1, da2)` or `da1.cov(da2)`?
CC @fujiisoup @shoyer ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973
https://github.com/pydata/xarray/pull/3550#issuecomment-556045623,https://api.github.com/repos/pydata/xarray/issues/3550,556045623,MDEyOklzc3VlQ29tbWVudDU1NjA0NTYyMw==,5635139,2019-11-20T15:10:41Z,2019-11-20T15:10:41Z,MEMBER,"Great start!
Thanks for the review @keewis
I think it's fine to leave `Dataset` for another PR; it'd be great to get this in, and given it's your first PR (welcome!) let's not bloat it
Test looks good. Let's make those adjustments you put in the `TODO` and add one for the other function? We could also add some variants which test along different dimensions / all NaNs / other special cases.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,525685973