MCPcopy
hub / github.com/dask/dask / test_random

Function test_random

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

Source from the content-addressed store, hash-verified

85
86
87def test_random(generator_class):
88 a = generator_class().random((10, 10), chunks=(5, 5))
89 assert isinstance(a, Array)
90 assert isinstance(a.name, str) and a.name
91 assert a.shape == (10, 10)
92 assert a.chunks == ((5, 5), (5, 5))
93
94 x = set(np.array(a).flat)
95
96 assert len(x) > 90
97
98
99def test_parametrized_random_function(generator_class):

Callers

nothing calls this directly

Calls 3

generator_classFunction · 0.85
setClass · 0.85
randomMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…