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

Function _apply_random_func

dask/array/random.py:804–810  ·  view source on GitHub ↗

Apply random module method with seed

(rng, funcname, bitgen, size, args, kwargs)

Source from the content-addressed store, hash-verified

802
803
804def _apply_random_func(rng, funcname, bitgen, size, args, kwargs):
805 """Apply random module method with seed"""
806 if isinstance(bitgen, np.random.SeedSequence):
807 bitgen = rng(bitgen)
808 rng = _rng_from_bitgen(bitgen)
809 func = getattr(rng, funcname)
810 return func(*args, size=size, **kwargs)
811
812
813def _apply_random(RandomState, funcname, state_data, size, args, kwargs):

Callers

nothing calls this directly

Calls 2

_rng_from_bitgenFunction · 0.70
funcFunction · 0.70

Tested by

no test coverage detected