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

Method permutation

dask/array/random.py:682–690  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

680
681 @derived_from(np.random.RandomState, skipblocks=1)
682 def permutation(self, x):
683 from dask.array.slicing import shuffle_slice
684
685 if isinstance(x, numbers.Number):
686 x = arange(x, chunks="auto")
687
688 index = np.arange(len(x))
689 self._numpy_state.shuffle(index)
690 return shuffle_slice(x, index)
691
692 @derived_from(np.random.RandomState, skipblocks=1)
693 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