In zilabrad.instrument.zurichHelper.zurich_qa, we notice that acquisition_poll() use append to create list,but we can replace it by the python build-in functions like map and lambda
### map version
chunks[p] = list(map(lambda v: v['vector'],dataset[p]))
num_obtained = sum([len(x) for x in chunks[p]])
if num_obtained >= num_samples:
gotem[p] = True
### append version
for v in dataset[p]:
chunks[p].append(v['vector'])
num_obtained = sum([len(x) for x in chunks[p]])
if num_obtained >= num_samples:
gotem[p] = True
In
zilabrad.instrument.zurichHelper.zurich_qa
, we notice thatacquisition_poll()
use append to create list,but we can replace it by the python build-in functions like map and lambdaWe can numerically test it
In the real device