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

Function test_divmod

dask/dataframe/tests/test_arithmetics_reduction.py:1219–1234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1217
1218
1219def test_divmod():
1220 df1 = pd.Series(np.random.rand(10))
1221 df2 = pd.Series(np.random.rand(10))
1222
1223 ddf1 = dd.from_pandas(df1, npartitions=3)
1224 ddf2 = dd.from_pandas(df2, npartitions=3)
1225
1226 result = divmod(ddf1, 2.0)
1227 expected = divmod(df1, 2.0)
1228 assert_eq(result[0], expected[0])
1229 assert_eq(result[1], expected[1])
1230
1231 result = divmod(ddf1, ddf2)
1232 expected = divmod(df1, df2)
1233 assert_eq(result[0], expected[0])
1234 assert_eq(result[1], expected[1])
1235
1236
1237@pytest.mark.skipif("not scipy")

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
divmodFunction · 0.50

Tested by

no test coverage detected