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

Function test_basic

dask/dataframe/tests/test_hyperloglog.py:68–73  ·  view source on GitHub ↗
(df, npartitions)

Source from the content-addressed store, hash-verified

66)
67@pytest.mark.parametrize("npartitions", [2, 20])
68def test_basic(df, npartitions):
69 ddf = dd.from_pandas(df, npartitions=npartitions)
70
71 approx = ddf.nunique_approx().compute(scheduler="sync")
72 exact = len(df.drop_duplicates())
73 assert abs(approx - exact) <= 2 or abs(approx - exact) / exact < 0.05
74
75
76@pytest.mark.parametrize("split_every", [None, 2, 10])

Callers

nothing calls this directly

Calls 3

computeMethod · 0.45
nunique_approxMethod · 0.45
drop_duplicatesMethod · 0.45

Tested by

no test coverage detected