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

Function test_preprocess

dask/array/tests/test_image.py:47–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47def test_preprocess():
48 def preprocess(x):
49 x[:] = 1
50 return x[:, :, 0]
51
52 with random_images(4, (2, 3, 4)) as globstring:
53 im = da_imread(globstring, preprocess=preprocess)
54 assert (im.compute() == np.ones((4, 2, 3), dtype="u1")).all()

Callers

nothing calls this directly

Calls 4

random_imagesFunction · 0.85
allMethod · 0.45
computeMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected