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

Function _rng_from_bitgen

dask/array/_array_expr/random.py:757–762  ·  view source on GitHub ↗
(bitgen)

Source from the content-addressed store, hash-verified

755
756
757def _rng_from_bitgen(bitgen):
758 # Assumes typename(bitgen) starts with importable
759 # library name (e.g. "numpy" or "cupy")
760 backend_name = typename(bitgen).split(".")[0]
761 backend_lib = importlib.import_module(backend_name)
762 return backend_lib.random.default_rng(bitgen)
763
764
765def _shuffle(bit_generator, x, axis=0):

Callers 3

_shuffleFunction · 0.70
_apply_random_funcFunction · 0.70
_choice_rngFunction · 0.70

Calls 2

typenameFunction · 0.90
splitMethod · 0.80

Tested by

no test coverage detected