MCPcopy Create free account
hub / github.com/Newmu/dcgan_code / list_shuffle

Function list_shuffle

lib/data_utils.py:23–28  ·  view source on GitHub ↗
(*data)

Source from the content-addressed store, hash-verified

21 return x
22
23def list_shuffle(*data):
24 idxs = np_rng.permutation(np.arange(len(data[0])))
25 if len(data) == 1:
26 return [data[0][idx] for idx in idxs]
27 else:
28 return [[d[idx] for idx in idxs] for d in data]
29
30def shuffle(*arrays, **options):
31 if isinstance(arrays[0][0], basestring):

Callers 1

shuffleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected