MCPcopy Create free account
hub / github.com/CompVis/zigma / rand_perm

Function rand_perm

utils/utils_zigzag.py:178–187  ·  view source on GitHub ↗
(N, num)

Source from the content-addressed store, hash-verified

176
177
178def rand_perm(N, num):
179 res = []
180 for _ in range(num):
181 # Generate a list of numbers from 0 to NxN-1
182 numbers = list(range(N * N))
183 # Randomly shuffle the numbers
184 random.shuffle(numbers)
185 # print(numbers)
186 res.append(numbers)
187 return res
188
189
190def traverse_grid_v1_continuous(N):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected