more refactoring on linef
[imago.git] / imago_pack / lhs.py
index c890dfe..71f88ff 100644 (file)
@@ -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: