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

Class RandomChoiceGenerator

dask/array/_array_expr/random.py:1032–1054  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030
1031
1032class RandomChoiceGenerator(RandomChoice):
1033 _defaults = {}
1034
1035 @cached_property
1036 def state_data(self):
1037 return _spawn_bitgens(self._state, len(self.sizes))
1038
1039 def _layer(self) -> dict:
1040 return {
1041 k: (
1042 _choice_rng,
1043 bitgen,
1044 self.array,
1045 size,
1046 self.replace,
1047 self.p,
1048 self.axis,
1049 self.shuffle,
1050 )
1051 for k, bitgen, size in zip(
1052 self.__dask_keys__(), self.state_data, self.sizes
1053 )
1054 }
1055
1056
1057"""

Callers 1

choiceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected