/[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 3815 by caltinay, Thu Feb 9 00:27:46 2012 UTC revision 3818 by caltinay, Mon Feb 13 01:12:08 2012 UTC
# Line 50  class Symbol(object): Line 50  class Symbol(object):
50      the `NonlinearPDE` class.      the `NonlinearPDE` class.
51      """      """
52    
53        # these are for compatibility with sympy.Symbol. lambdify checks these.
54        is_Add=False
55        is_Float=False
56    
57      def __init__(self, *args, **kwargs):      def __init__(self, *args, **kwargs):
58          """          """
59          Initialises a new `Symbol` object in one of three ways::          Initialises a new `Symbol` object in one of three ways::
# Line 148  class Symbol(object): Line 152  class Symbol(object):
152      def __getitem__(self, key):      def __getitem__(self, key):
153          return self._arr[key]          return self._arr[key]
154    
155        def __iter__(self):
156            return self._arr.__iter__
157    
158      def __setitem__(self, key, value):      def __setitem__(self, key, value):
159          if isinstance(value, Symbol):          if isinstance(value, Symbol):
160              if value.getRank()==0:              if value.getRank()==0:
# Line 240  class Symbol(object): Line 247  class Symbol(object):
247          return s          return s
248    
249      def _sympystr_(self, printer):      def _sympystr_(self, printer):
250            # compatibility with sympy 1.6
251            return self._sympystr(printer)
252    
253        def _sympystr(self, printer):
254          return self.lambdarepr()          return self.lambdarepr()
255    
256      def lambdarepr(self):      def lambdarepr(self):

Legend:
Removed from v.3815  
changed lines
  Added in v.3818

  ViewVC Help
Powered by ViewVC 1.1.26