/[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 3990 by caltinay, Tue Sep 25 05:03:20 2012 UTC revision 4018 by jfenwick, Thu Oct 11 04:43:39 2012 UTC
# Line 162  class Symbol(object): Line 162  class Symbol(object):
162          if self.getShape()!=other.getShape():          if self.getShape()!=other.getShape():
163              return False              return False
164          return (self._arr==other._arr).all()          return (self._arr==other._arr).all()
165            
166        def __hash__(self):
167            return id(self)
168    
169      def __getitem__(self, key):      def __getitem__(self, key):
170          """          """
# Line 640  class Symbol(object): Line 643  class Symbol(object):
643          """          """
644          if axis_offset is None:          if axis_offset is None:
645              axis_offset=int(self._arr.ndim/2)              axis_offset=int(self._arr.ndim/2)
646          axes=range(axis_offset, self._arr.ndim)+range(0,axis_offset)          axes=list(range(axis_offset, self._arr.ndim))+list(range(0,axis_offset))
647          return Symbol(numpy.transpose(self._arr, axes=axes), dim=self._dim, subs=self._subs)          return Symbol(numpy.transpose(self._arr, axes=axes), dim=self._dim, subs=self._subs)
648    
649      def applyfunc(self, f, on_type=None):      def applyfunc(self, f, on_type=None):
# Line 748  class Symbol(object): Line 751  class Symbol(object):
751    
752      def __div__(self, other):      def __div__(self, other):
753          return self.__binaryop('__div__', other)          return self.__binaryop('__div__', other)
754            
755      def __rdiv__(self, other):      def __rdiv__(self, other):
756          return self.__binaryop('__rdiv__', other)          return self.__binaryop('__rdiv__', other)
757            
758      def __pow__(self, other):      def __pow__(self, other):
759          return self.__binaryop('__pow__', other)          return self.__binaryop('__pow__', other)
760    

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

  ViewVC Help
Powered by ViewVC 1.1.26