~daniele-bigoni/tensortoolbox/trunk

« back to all changes in this revision

Viewing changes to Examples/Quadrature/Convergence.py

  • Committer: Daniele Bigoni
  • Date: 2017-05-17 20:45:05 UTC
  • Revision ID: dabi@dtu.dk-20170517204505-bm3ynygcdy1dgasm
updated example convergence to avoid plateau at 10^-6

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
TTfevals = np.zeros( (1,P) )
36
36
TTerrs = np.zeros( (1,P) )
37
 
for i in xrange(1,P+1):
38
 
    print "RUNNING TT P=" + str(i)
 
37
for i in range(1,P+1):
 
38
    print("RUNNING TT P=" + str(i))
39
39
    N = 2**i
40
40
    
41
41
    # QTT approx
46
46
U = 18
47
47
UQfevals = np.zeros( (2,U) )
48
48
UQerrs = np.zeros( (2,U) )
49
 
for i in xrange(1,U+1):
 
49
for i in range(1,U+1):
50
50
    N = 2**i
51
 
    print "RUNNING UQ U=" + str(i)
52
 
    print "RUNNING UQ N=" + str(N)
 
51
    print("RUNNING UQ U=" + str(i))
 
52
    print("RUNNING UQ N=" + str(N))
53
53
 
54
54
    # UQ approx MC
55
55
    (feval, err) = UQr( N, 'mc' )