projekty
/
imago.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor do_something in linef
[imago.git]
/
imago_pack
/
lhs.py
diff --git
a/imago_pack/lhs.py
b/imago_pack/lhs.py
index
c890dfe
..
71f88ff
100644
(file)
--- a/
imago_pack/lhs.py
+++ b/
imago_pack/lhs.py
@@
-1,3
+1,5
@@
+"""Latin hypercube sampling."""
+
import random
def test():
import random
def test():
@@
-16,6
+18,7
@@
def test():
sys.exit()
def latin_hypercube(dim, bound, m):
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:
dv = (2 * bound) / float(m)
dim_p = [range(m) for _ in xrange(dim)]
for p in dim_p: