Gauss 3d.py
From Werner KRAUTH
Revision as of 22:01, 22 September 2015; view current revision
←Older revision | Newer revision→
←Older revision | Newer revision→
This page presents the program gauss_3d.py, a direct-sampling algorithm for three independent Gaussians.
Contents |
[edit]
Description
[edit]
Program
import random, math nsamples = 100 for sample in xrange(nsamples): x, y, z = (random.gauss(0.0, 1.0), random.gauss(0.0, 1.0), random.gauss(0.0, 1.0)) print x, y, z
[edit]
Version
See history for version information.