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

Function _apply_random

dask/array/_array_expr/random.py:786–792  ·  view source on GitHub ↗

Apply RandomState method with seed

(RandomState, funcname, state_data, size, args, kwargs)

Source from the content-addressed store, hash-verified

784
785
786def _apply_random(RandomState, funcname, state_data, size, args, kwargs):
787 """Apply RandomState method with seed"""
788 if RandomState is None:
789 RandomState = array_creation_dispatch.RandomState
790 state = RandomState(state_data)
791 func = getattr(state, funcname)
792 return func(*args, size=size, **kwargs)
793
794
795def _choice_rng(state_data, a, size, replace, p, axis, shuffle):

Callers

nothing calls this directly

Calls 2

RandomStateClass · 0.70
funcFunction · 0.50

Tested by

no test coverage detected