Exemple #1
0
def wiener(variance=1.):
    return cstream.repeat_call(random.gauss, 0., variance) >> cstream.prepend([0.])
Exemple #2
0
def random_walk(origin, directions):
    return cstream.repeat_call(random.choice, directions) >> cstream.StreamFold(vector_add, initval=origin)