Envision uses pseudo-randomness. If the script and the input data do not
change, repeated runs produce identical results. Any data change resets the
random sequences. The runtime manages seeds and preserves determinism even
when execution is distributed.
Repeated calls to a random function within the same script return different
values:
a = random.uniform(0, 1)
b = random.uniform(0, 1)
show summary "Random scalars" with
a
b
This outputs the following summary:
a
b
0.6779699
0.5477362
Random scalar values are broadcast when assigned to a table column. Use into
to generate per-row random values:
table T = extend.range(3)
T.X = random.uniform(0, 1)
T.Y = random.uniform(0 into T, 1)
show table "Random vectors" with
T.X
T.Y