forked from M-Labs/artiq
1
0
Fork 0

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
1 changed files with 3 additions and 0 deletions

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)