home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 633216248

This data as json

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-633216248 https://api.github.com/repos/pydata/xarray/issues/4089 633216248 MDEyOklzc3VlQ29tbWVudDYzMzIxNjI0OA== 14808389 2020-05-24T11:22:42Z 2020-05-24T12:09:51Z MEMBER

If you want to test individual values without reimplementing the function in the tests (which is what I suspect comparing with the result of np.cov would require), that might be the only way.

If not, you could also check properties of covariance / correlation matrices, e.g. that assert_allclose(xr.cov(a, b) / (a.std() * b.std()), xr.corr(a, b)) (I'm not sure if I remember that formula correctly) or that the diagonal of the auto-covariance matrix is the same as the variance of the array (with a 1D vector, not sure about more dimensions). If you decide to test using properties, you could also extend our small collection of tests using hypothesis (see #1846).

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  623751213
Powered by Datasette · Queries took 0.694ms · About: xarray-datasette