(self, name, datatype=None, dimensions=None, precision=None)
Initializes a Variable instance

           name  --  must be of class Symbol
           datatype  --  When not given, the data type will be guessed based
                         on the assumptions on the symbol argument.
           dimension  --  If present, the argument is interpreted as an array.
                          Dimensions must be a sequence containing tuples, i.e.
                          (lower, upper) bounds for each index of the array
           precision  --  FIXME
Initializes a Variable instance
Initializes a Variable instance
def __init__(self, name, datatype=None, dimensions=None, precision=None):
        """Initializes a Variable instance

           name  --  must be of class Symbol
           datatype  --  When not given, the data type will be guessed based
                         on the assumptions on the symbol argument.
           dimension  --  If present, the argument is interpreted as an array.
                          Dimensions must be a sequence containing tuples, i.e.
                          (lower, upper) bounds for each index of the array
           precision  --  FIXME
        """
        if not isinstance(name, Symbol):
            raise TypeError("The first argument must be a sympy symbol.")
        if datatype is None:
            datatype = get_default_datatype(name)
        elif not isinstance(datatype, DataType):
            raise TypeError("The (optional) `datatype' argument must be an instance of the DataType class.")
        if dimensions and not isinstance(dimensions, (tuple, list)):
            raise TypeError(
                "The dimension argument must be a sequence of tuples")

        self._name = name
        self._datatype = {
            'C': datatype.cname,
            'FORTRAN': datatype.fname,
            'PYTHON': datatype.pyname
        }
        self.dimensions = dimensions
        self.precision = precision
def __init__ ( self , name , datatype = None , dimensions = None , precision = None ) : if not isinstance ( name , Symbol ) : raise TypeError ( "The first argument must be a sympy symbol." ) if datatype is None : datatype = get_default_datatype ( name ) elif not isinstance ( datatype , DataType ) : raise TypeError ( "The (optional) `datatype' argument must be an instance of the DataType class." ) if dimensions and not isinstance ( dimensions , ( tuple , list ) ) : raise TypeError ( "The dimension argument must be a sequence of tuples" ) self . _name = name self . _datatype = { 'C' : datatype . cname , 'FORTRAN' : datatype . fname , 'PYTHON' : datatype . pyname } self . dimensions = dimensions self . precision = precision