Changeset 687 for branches/UQ/math/examples2/TEST_OUQ_surrogate_diam.py
- Timestamp:
- 06/15/13 18:43:09 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UQ/math/examples2/TEST_OUQ_surrogate_diam.py
r575 r687 68 68 69 69 from mystic.math.measures import split_param 70 from mystic.math.di rac_measure import product_measure70 from mystic.math.discrete import product_measure 71 71 from mystic.math import almostEqual 72 72 from numpy import inf … … 94 94 # impose expectation on product measure 95 95 ##################### begin function-specific ##################### 96 E = float(c. get_expect(model))96 E = float(c.expect(model)) 97 97 if not (E <= float(target[0] + error[0])) \ 98 98 or not (float(target[0] - error[0]) <= E): … … 106 106 c = product_measure() 107 107 c.load(rv, npts) 108 E = float(c. get_expect(model))108 E = float(c.expect(model)) 109 109 if E > (target[0] + error[0]) or E < (target[0] - error[0]): 110 110 if debug: print "skipping expect: %s" % E … … 190 190 191 191 from numpy import array 192 from mystic.math.di rac_measure import product_measure192 from mystic.math.discrete import product_measure 193 193 c = product_measure() 194 194 c.load(solved,npts) … … 197 197 print "solved: [wz,z]\n%s" % array(zip(c[2].weights,c[2].coords)) 198 198 199 print "expect: %s" % str( c. get_expect(model) )199 print "expect: %s" % str( c.expect(model) ) 200 200 201 201 # EOF
Note: See TracChangeset
for help on using the changeset viewer.