MCPcopy Index your code
hub / github.com/lisa-lab/DeepLearningTutorials / shuffle

Function shuffle

code/rnnslu.py:32–41  ·  view source on GitHub ↗

lol :: list of list as input seed :: seed the shuffling shuffle inplace each list in the same order

(lol, seed)

Source from the content-addressed store, hash-verified

30
31# utils functions
32def shuffle(lol, seed):
33 '''
34 lol :: list of list as input
35 seed :: seed the shuffling
36
37 shuffle inplace each list in the same order
38 '''
39 for l in lol:
40 random.seed(seed)
41 random.shuffle(l)
42
43
44# start-snippet-1

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected