MCPcopy
hub / github.com/dask/dask / test_parametrized_random_function

Function test_parametrized_random_function

dask/array/tests/test_random.py:99–110  ·  view source on GitHub ↗
(generator_class)

Source from the content-addressed store, hash-verified

97
98
99def test_parametrized_random_function(generator_class):
100 a = generator_class().exponential(1000, (10, 10), chunks=(5, 5))
101 assert isinstance(a, Array)
102 assert isinstance(a.name, str) and a.name
103 assert a.shape == (10, 10)
104 assert a.chunks == ((5, 5), (5, 5))
105
106 x = np.array(a)
107 assert 10 < x.mean() < 100000
108
109 y = set(x.flat)
110 assert len(y) > 90
111
112
113def test_kwargs(generator_class):

Callers

nothing calls this directly

Calls 4

generator_classFunction · 0.85
setClass · 0.85
exponentialMethod · 0.45
meanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…