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

Function test_size_optimized

dask/dataframe/dask_expr/tests/test_collection.py:1408–1419  ·  view source on GitHub ↗
(df)

Source from the content-addressed store, hash-verified

1406
1407@xfail_gpu("Cannot apply lambda function in cudf")
1408def test_size_optimized(df):
1409 with pytest.warns(UserWarning, match="metadata"):
1410 expr = (df.x + 1).apply(lambda x: x).size
1411 out = optimize(expr)
1412 expected = optimize(df.x.size)
1413 assert out._name == expected._name
1414
1415 with pytest.warns(UserWarning, match="metadata"):
1416 expr = (df + 1).apply(lambda x: x, axis=1).size
1417 out = optimize(expr)
1418 expected = optimize(df.size)
1419 assert out._name == expected._name
1420
1421
1422def test_series_iter(df, pdf):

Callers

nothing calls this directly

Calls 2

optimizeFunction · 0.90
applyMethod · 0.45

Tested by

no test coverage detected