MCPcopy
hub / github.com/dask/dask / _apply_random_func

Function _apply_random_func

dask/array/_array_expr/random.py:777–783  ·  view source on GitHub ↗

Apply random module method with seed

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

Source from the content-addressed store, hash-verified

775
776
777def _apply_random_func(rng, funcname, bitgen, size, args, kwargs):
778 """Apply random module method with seed"""
779 if isinstance(bitgen, np.random.SeedSequence):
780 bitgen = rng(bitgen)
781 rng = _rng_from_bitgen(bitgen)
782 func = getattr(rng, funcname)
783 return func(*args, size=size, **kwargs)
784
785
786def _apply_random(RandomState, funcname, state_data, size, args, kwargs):

Callers

nothing calls this directly

Calls 2

_rng_from_bitgenFunction · 0.70
funcFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…