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

« back to all changes in this revision

Viewing changes to python/src/PythonNumericalMathEvaluationImplementation.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-08-18 18:14:38 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090818181438-copqi92r4z7y0ejc
Tags: 0.13.1-1ubuntu1
debian/python-openturns.install: update to use python* and *-packages.
This fix a FTBFS with python2.6.  (LP: #350437)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 *
13
13
 *
14
14
 * \author $LastChangedBy: dutka $
15
 
 * \date   $LastChangedDate: 2008-10-15 17:56:07 +0200 (mer 15 oct 2008) $
 
15
 * \date   $LastChangedDate: 2009-04-10 10:46:19 +0200 (ven. 10 avril 2009) $
16
16
 */
17
17
 
18
18
#include "PythonNumericalMathEvaluationImplementation.hxx"
 
19
#include "OSS.hxx"
 
20
#include "Description.hxx"
19
21
 
20
22
namespace OpenTURNS {
21
23
 
31
33
          pyObj_(pyCallable)
32
34
      {
33
35
        Py_XINCREF( pyCallable );
 
36
        // One MUST initialize the description with the correct dimension
 
37
        const UnsignedLong inputDimension(getInputNumericalPointDimension());
 
38
        const UnsignedLong outputDimension(getOutputNumericalPointDimension());
 
39
        Description description(inputDimension + outputDimension);
 
40
        for (UnsignedLong i = 0; i < inputDimension; ++i) description[i] = (OSS() << "x" << i);
 
41
        for (UnsignedLong i = 0; i < outputDimension; ++i) description[inputDimension + i] = (OSS() << "y" << i);
 
42
        setDescription(description);
34
43
      }
35
44
 
36
45
      /* Virtual constructor */