OpenTURNSPythonFieldToPointFunction

class OpenTURNSPythonFieldToPointFunction(n=0, p=0, s=0)

Override FieldToPointFunction from Python.

Parameters:

inputDim : positive int

Dimension of the input field values d

outputDim : positive int

Dimension of the output vector d’

spatialDim : positive integer

Dimension of the input domain n

Notes

You have to overload the function:
_exec(X): single evaluation, X is a Field, returns a Field

Examples

>>> import openturns as ot
>>> class FUNC(ot.OpenTURNSPythonFieldToPointFunction):
...    def __init__(self):
...         # first argument:
...         super(FUNC, self).__init__(2, 2, 1)
...         self.setInputDescription(['R', 'S'])
...         self.setOutputDescription(['T', 'U'])
...    def _exec(self, X):
...         Y = X.getValues().computeMean()
...         return Y
>>> F = FUNC()

Methods

__call__(…) <==> x(…)
getInputDescription()
getInputDimension()
getOutputDescription()
getOutputDimension()
getSpatialDimension()
setInputDescription(descIn)
setOutputDescription(descOut)
__init__(n=0, p=0, s=0)

x.__init__(…) initializes x; see help(type(x)) for signature