2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

language/scan: add missing attributes to RandomScan

Reported by Joe
This commit is contained in:
Sebastien Bourdeauducq 2015-10-11 10:05:27 +08:00
parent 3768c87bed
commit cd3b590962

View File

@ -79,6 +79,9 @@ class RandomScan(ScanObject):
"""A scan object that yields a fixed number of randomly ordered evenly
spaced values in a range."""
def __init__(self, min, max, npoints, seed=0):
self.min = min
self.max = max
self.npoints = npoints
self.sequence = list(LinearScan(min, max, npoints))
shuffle(self.sequence, Random(seed).random)