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

Function udf_pad

dask/array/tests/test_creation.py:979–984  ·  view source on GitHub ↗
(vector, pad_width, iaxis, inner_kwargs)

Source from the content-addressed store, hash-verified

977@pytest.mark.parametrize("kwargs", [{}, {"scaler": 2}])
978def test_pad_udf(kwargs):
979 def udf_pad(vector, pad_width, iaxis, inner_kwargs):
980 assert kwargs == inner_kwargs
981 scaler = inner_kwargs.get("scaler", 1)
982 vector[: pad_width[0]] = -scaler * pad_width[0]
983 vector[-pad_width[1] :] = scaler * pad_width[1]
984 return vector
985
986 shape = (10, 11)
987 chunks = (4, 5)

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected