X-Git-Url: http://git.tomasm.cz/imago.git/blobdiff_plain/ecc0929cb0e011db2825e79d7495d7ef7b113e1e..b8d894cc2b9cf2b381560e47e6a35fbda2edba59:/imago_pack/lhs.py?ds=sidebyside diff --git a/imago_pack/lhs.py b/imago_pack/lhs.py index c890dfe..71f88ff 100644 --- a/imago_pack/lhs.py +++ b/imago_pack/lhs.py @@ -1,3 +1,5 @@ +"""Latin hypercube sampling.""" + import random def test(): @@ -16,6 +18,7 @@ def test(): sys.exit() def latin_hypercube(dim, bound, m): + """Get a sample of *dim* dimentions, each in range (-*bound*, +*bound*).""" dv = (2 * bound) / float(m) dim_p = [range(m) for _ in xrange(dim)] for p in dim_p: