(self, expr, datatype=None, precision=None)
Initialize a (scalar) return value.

           The second argument is optional. When not given, the data type will
           be guessed based on the assumptions on the expression argument.
Initialize a (scalar) return value.
Initialize a ( scalar ) return value .
def __init__(self, expr, datatype=None, precision=None):
        """Initialize a (scalar) return value.

           The second argument is optional. When not given, the data type will
           be guessed based on the assumptions on the expression argument.
        """
        if not isinstance(expr, Expr):
            raise TypeError("The first argument must be a sympy expression.")

        temp_var = Variable(Symbol('result_%s' % hash(expr)),
                datatype=datatype, dimensions=None, precision=precision)
        ResultBase.__init__(self, expr, temp_var.name)
        self._temp_variable = temp_var
def __init__ ( self , expr , datatype = None , precision = None ) : if not isinstance ( expr , Expr ) : raise TypeError ( "The first argument must be a sympy expression." ) temp_var = Variable ( Symbol ( 'result_%s' % hash ( expr ) ) , datatype = datatype , dimensions = None , precision = precision ) ResultBase . __init__ ( self , expr , temp_var . name ) self . _temp_variable = temp_var