/[escript]/trunk/escript/py_src/util.py
ViewVC logotype

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

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

revision 2237 by gross, Tue Feb 3 06:14:19 2009 UTC revision 2255 by gross, Mon Feb 9 06:10:13 2009 UTC
# Line 4655  def maximum(*args): Line 4655  def maximum(*args):
4655            if isinstance(out,escript.Data) and isinstance(a,escript.Data):            if isinstance(out,escript.Data) and isinstance(a,escript.Data):
4656               out.copyWithMask(a,wherePositive(a-out))               out.copyWithMask(a,wherePositive(a-out))
4657            else:            else:
4658               diff=add(a-out)               diff=add(a,-out)
4659               out=add(out,wherePositive(diff),diff)               out=add(out,mult(wherePositive(diff),diff))
4660      return out      return out
4661    
4662  def minimum(*args):  def minimum(*args):

Legend:
Removed from v.2237  
changed lines
  Added in v.2255

  ViewVC Help
Powered by ViewVC 1.1.26