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

Function test_randomstate_kwargs

dask/array/tests/test_random.py:438–447  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

436
437
438def test_randomstate_kwargs():
439 cupy = pytest.importorskip("cupy")
440
441 rs = da.random.RandomState(RandomState=cupy.random.RandomState)
442 x = rs.standard_normal((10, 5), dtype=np.float32)
443 assert x.dtype == np.float32
444
445 rs = da.random.default_rng(cupy.random.default_rng())
446 x = rs.standard_normal((10, 5), dtype=np.float32)
447 assert x.dtype == np.float32

Callers

nothing calls this directly

Calls 2

standard_normalMethod · 0.95
RandomStateMethod · 0.45

Tested by

no test coverage detected