/[escript]/trunk/escript/py_src/symbolic/symbol.py
ViewVC logotype

Diff of /trunk/escript/py_src/symbolic/symbol.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3975 by caltinay, Thu Sep 20 01:54:06 2012 UTC revision 3978 by caltinay, Thu Sep 20 04:36:17 2012 UTC
# Line 30  __author__="Cihan Altinay" Line 30  __author__="Cihan Altinay"
30  """  """
31    
32  import numpy  import numpy
33  import sympy  from esys.escript import Data, FunctionSpace, HAVE_SYMBOLS
34  from esys.escript import Data, FunctionSpace  if HAVE_SYMBOLS:
35        import sympy
36    
37        
38  class Symbol(object):  class Symbol(object):
# Line 82  class Symbol(object): Line 83  class Symbol(object):
83          :keyword dim: dimensionality of the new Symbol (default: 2)          :keyword dim: dimensionality of the new Symbol (default: 2)
84          :type dim: ``int``          :type dim: ``int``
85          """          """
86            if not HAVE_SYMBOLS:
87                raise RuntimeError("Trying to instantiate a Symbol but sympy not available")
88    
89          if 'dim' in kwargs:          if 'dim' in kwargs:
90              self._dim=kwargs.pop('dim')              self._dim=kwargs.pop('dim')
91          else:          else:

Legend:
Removed from v.3975  
changed lines
  Added in v.3978

  ViewVC Help
Powered by ViewVC 1.1.26