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

Function wrapper

dask/array/random.py:1055–1062  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

1053
1054def _make_api(attr):
1055 def wrapper(*args, **kwargs):
1056 key = array_creation_dispatch.backend
1057 with _cached_states_lock:
1058 try:
1059 state = _cached_states[key]
1060 except KeyError:
1061 _cached_states[key] = state = RandomState()
1062 return getattr(state, attr)(*args, **kwargs)
1063
1064 wrapper.__name__ = getattr(RandomState, attr).__name__
1065 wrapper.__doc__ = getattr(RandomState, attr).__doc__

Callers

nothing calls this directly

Calls 1

RandomStateClass · 0.70

Tested by

no test coverage detected