MCPcopy
hub / github.com/dask/dask / permutation

Method permutation

dask/array/_array_expr/random.py:656–664  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

654
655 @derived_from(np.random.RandomState, skipblocks=1)
656 def permutation(self, x):
657 from dask.array.slicing import shuffle_slice
658
659 if isinstance(x, numbers.Number):
660 x = arange(x, chunks="auto")
661
662 index = np.arange(len(x))
663 self._numpy_state.shuffle(index)
664 return shuffle_slice(x, index)
665
666 @derived_from(np.random.RandomState, skipblocks=1)
667 def poisson(self, lam=1.0, size=None, chunks="auto", **kwargs):

Callers

nothing calls this directly

Calls 4

arangeFunction · 0.90
shuffle_sliceFunction · 0.90
arangeMethod · 0.45
shuffleMethod · 0.45

Tested by

no test coverage detected