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

Method permutation

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

Source from the content-addressed store, hash-verified

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