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

Function test_divmod

dask/dataframe/dask_expr/tests/test_reductions.py:407–422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

405
406
407def test_divmod():
408 df1 = pd.Series(np.random.rand(10))
409 df2 = pd.Series(np.random.rand(10))
410
411 ddf1 = from_pandas(df1, npartitions=3)
412 ddf2 = from_pandas(df2, npartitions=3)
413
414 result = divmod(ddf1, 2.0)
415 expected = divmod(df1, 2.0)
416 assert_eq(result[0], expected[0])
417 assert_eq(result[1], expected[1])
418
419 result = divmod(ddf1, ddf2)
420 expected = divmod(df1, df2)
421 assert_eq(result[0], expected[0])
422 assert_eq(result[1], expected[1])
423
424
425def test_value_counts_with_normalize():

Callers

nothing calls this directly

Calls 3

from_pandasFunction · 0.90
assert_eqFunction · 0.90
divmodFunction · 0.50

Tested by

no test coverage detected