/[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 4018 by jfenwick, Thu Oct 11 04:43:39 2012 UTC revision 4019 by jfenwick, Thu Oct 11 08:12:55 2012 UTC
# Line 463  class Symbol(object): Line 463  class Symbol(object):
463              subs.update({fssym:where})              subs.update({fssym:where})
464              where=name              where=name
465    
466          from functions import grad_n          from .functions import grad_n
467          out=self._arr.copy().reshape(self.getShape()+(1,)).repeat(self._dim,axis=self.getRank())          out=self._arr.copy().reshape(self.getShape()+(1,)).repeat(self._dim,axis=self.getRank())
468          for d in range(self._dim):          for d in range(self._dim):
469              for idx in numpy.ndindex(self.getShape()):              for idx in numpy.ndindex(self.getShape()):
# Line 750  class Symbol(object): Line 750  class Symbol(object):
750          return self.__binaryop('__rmul__', other)          return self.__binaryop('__rmul__', other)
751    
752      def __div__(self, other):      def __div__(self, other):
753            print(type(self), type(other))
754          return self.__binaryop('__div__', other)          return self.__binaryop('__div__', other)
755            
756        def __truediv__(self, other):
757            return self.__binaryop('__truediv__', other)
758                
759      def __rdiv__(self, other):      def __rdiv__(self, other):
760          return self.__binaryop('__rdiv__', other)          return self.__binaryop('__rdiv__', other)
761                
762        def __rtruediv__(self, other):
763            return self.__binaryop('__rtruediv__', other)    
764      def __pow__(self, other):      def __pow__(self, other):
765          return self.__binaryop('__pow__', other)          return self.__binaryop('__pow__', other)
766    

Legend:
Removed from v.4018  
changed lines
  Added in v.4019

  ViewVC Help
Powered by ViewVC 1.1.26