# Diff of /trunk/escript/py_src/util.py

revision 535 by gross, Wed Feb 15 07:11:00 2006 UTC revision 536 by gross, Fri Feb 17 03:20:53 2006 UTC
# Line 3277  class Transpose_Symbol(DependendSymbol): Line 3277  class Transpose_Symbol(DependendSymbol):
3277           return identity(self.getShape())           return identity(self.getShape())
3278        else:        else:
3279           return transpose(self.getDifferentiatedArguments(arg)[0],axis_offset=self.getArgument()[1])           return transpose(self.getDifferentiatedArguments(arg)[0],axis_offset=self.getArgument()[1])
3280    def symmetric(arg):
3281        """
3282        returns the symmetric part of the square matrix arg. This is (arg+transpose(arg))/2
3283
3284        @param arg: square matrix. Must have rank 2 or 4 and be square.
3285        @type arg: L{numarray.NumArray}, L{escript.Data}, L{Symbol}
3286        @return: symmetric part of arg
3287        @rtype: L{numarray.NumArray}, L{escript.Data}, L{Symbol} depending on the input
3288        """
3289        return (arg+transpose(arg))/2
3290
3291    def nonsymmetric(arg):
3292        """
3293        returns the nonsymmetric part of the square matrix arg. This is (arg-transpose(arg))/2
3294
3295        @param arg: square matrix. Must have rank 2 or 4 and be square.
3296        @type arg: L{numarray.NumArray}, L{escript.Data}, L{Symbol}
3297        @return: symmetric part of arg
3298        @rtype: L{numarray.NumArray}, L{escript.Data}, L{Symbol} depending on the input
3299        """
3300        return (arg-transpose(arg))/2
3301
3302  def inverse(arg):  def inverse(arg):
3303      """      """

Legend:
 Removed from v.535 changed lines Added in v.536

 ViewVC Help Powered by ViewVC 1.1.26