MCPcopy
hub / github.com/pydata/xarray / covariance

Function covariance

xarray/tests/test_computation.py:1290–1293  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

1288 import dask.array as da
1289
1290 def covariance(x, y):
1291 return (
1292 (x - x.mean(axis=-1, keepdims=True)) * (y - y.mean(axis=-1, keepdims=True))
1293 ).mean(axis=-1)
1294
1295 rs = np.random.default_rng(42)
1296 array1 = da.from_array(rs.random((4, 4)), chunks=(2, 4))

Callers

nothing calls this directly

Calls 1

meanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…