~ubuntu-branches/ubuntu/maverick/openturns/maverick

« back to all changes in this revision

Viewing changes to python/test/t_QuadraticTaylor_std.py

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2010-05-10 17:27:55 UTC
  • mfrom: (1.1.4 upstream) (5.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100510172755-cb5ynskknqqi5rhp
Tags: 0.13.2-2ubuntu1
* Merge with Debian testing. No changes left.
* ubuntu_fix-python-2.6.patch: fix detection of python 2.6 libs, to not use
  LOCALMODLIBS. This pulls a dependency on SSL and makes the package FTBFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
   eps = 0.4
9
9
   #Instance creation
10
10
   myFunc = NumericalMathFunction("TestResponseSurface")
11
 
   center = NumericalPoint(myFunc.getInputNumericalPointDimension())
 
11
   center = NumericalPoint(myFunc.getInputDimension())
12
12
   for i in range(center.getDimension()) :
13
13
      center[i] = 1.0+i
14
14
   myTaylor = QuadraticTaylor(center, myFunc)
15
15
   myTaylor.run()
16
16
   responseSurface = NumericalMathFunction(myTaylor.getResponseSurface())
17
 
   print "myTaylor=", myTaylor 
18
 
   print "responseSurface=", responseSurface 
 
17
   print "myTaylor=", myTaylor
 
18
   print "responseSurface=", responseSurface
19
19
   print "myFunc(", repr(center), ")=", repr(myFunc(center))
20
 
   print "responseSurface(", repr(center), ")=", repr(responseSurface(center)) 
 
20
   print "responseSurface(", repr(center), ")=", repr(responseSurface(center))
21
21
   inPoint = NumericalPoint(center)
22
22
   inPoint[0] += eps
23
23
   inPoint[1] -= eps/2
24
24
   print "myFunc(", repr(inPoint), ")=", repr(myFunc(inPoint))
25
25
   print "responseSurface(", repr(inPoint), ")=", repr(responseSurface(inPoint))
26
26
 
27
 
except : 
28
 
    import sys
29
 
    print "t_QuadraticTaylor_std.py", sys.exc_type, sys.exc_value
 
27
except :
 
28
   import sys
 
29
   print "t_QuadraticTaylor_std.py", sys.exc_type, sys.exc_value