MCPcopy Create free account
hub / github.com/dask/dask / test_cov_dataframe

Function test_cov_dataframe

dask/dataframe/tests/test_dataframe.py:3009–3030  ·  view source on GitHub ↗
(numeric_only)

Source from the content-addressed store, hash-verified

3007 ],
3008)
3009def test_cov_dataframe(numeric_only):
3010 df = _compat.makeMissingDataFrame()
3011 ddf = dd.from_pandas(df, npartitions=6)
3012
3013 numeric_only_kwarg = {}
3014 if numeric_only is not None:
3015 numeric_only_kwarg = {"numeric_only": numeric_only}
3016
3017 res = ddf.cov(**numeric_only_kwarg)
3018 res2 = ddf.cov(**numeric_only_kwarg, split_every=2)
3019 res3 = ddf.cov(10, **numeric_only_kwarg)
3020 res4 = ddf.cov(10, **numeric_only_kwarg, split_every=2)
3021 sol = df.cov(**numeric_only_kwarg)
3022 sol2 = df.cov(10, **numeric_only_kwarg)
3023 assert_eq(res, sol)
3024 assert_eq(res2, sol)
3025 assert_eq(res3, sol2)
3026 assert_eq(res4, sol2)
3027 assert res._name == ddf.cov(**numeric_only_kwarg)._name
3028 assert res._name != res2._name
3029 assert res3._name != res4._name
3030 assert res._name != res3._name
3031
3032
3033def test_cov_series():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
covMethod · 0.45

Tested by

no test coverage detected