(self, fun, lower, upper, name='saturation')
Initialization. See `Saturation`.
Initialization. See `Saturation`.
Initialization . See Saturation .
def __init__(self, fun, lower, upper, name='saturation'):
        """Initialization. See `Saturation`."""
        super(Saturation, self).__init__(name=name)
        self.fun = fun
        self.lower = lower
        self.upper = upper

        self.input_dim = self.fun.input_dim
        self.output_dim = self.fun.output_dim

        # Copy over attributes and functions from fun
        for par in dir(self.fun):
            if par.startswith('__') or hasattr(self, par):
                continue
            setattr(self, par, eval('self.fun.' + par))
def __init__ ( self , fun , lower , upper , name = 'saturation' ) : super ( Saturation , self ) . __init__ ( name = name ) self . fun = fun self . lower = lower self . upper = upper self . input_dim = self . fun . input_dim self . output_dim = self . fun . output_dim # Copy over attributes and functions from fun for par in dir ( self . fun ) : if par . startswith ( '__' ) or hasattr ( self , par ) : continue setattr ( self , par , eval ( 'self.fun.' + par ) )