/[escript]/branches/symbolic_from_3470/escript/py_src/util.py
ViewVC logotype

Diff of /branches/symbolic_from_3470/escript/py_src/util.py

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

revision 3495 by caltinay, Tue Apr 5 23:05:18 2011 UTC revision 3496 by caltinay, Wed Apr 6 03:58:42 2011 UTC
# Line 479  def Lsup(arg): Line 479  def Lsup(arg):
479      elif isinstance(arg,int):      elif isinstance(arg,int):
480          return abs(float(arg))          return abs(float(arg))
481      else:      else:
482        raise TypeError,"Lsup: Unknown argument type."          raise TypeError,"Lsup: Unknown argument type."
483    
484  def sup(arg):  def sup(arg):
485      """      """
# Line 500  def sup(arg): Line 500  def sup(arg):
500      elif isinstance(arg,int):      elif isinstance(arg,int):
501          return float(arg)          return float(arg)
502      else:      else:
503        raise TypeError,"sup: Unknown argument type."          raise TypeError,"sup: Unknown argument type."
504    
505  def inf(arg):  def inf(arg):
506      """      """
# Line 983  def erf(arg): Line 983  def erf(arg):
983     """     """
984     if isinstance(arg,escript.Data):     if isinstance(arg,escript.Data):
985        return arg._erf()        return arg._erf()
986       elif isinstance(arg,Basic):
987          return symfn.erf(arg)
988     else:     else:
989        raise TypeError,"erf: Unknown argument type."        raise TypeError,"erf: Unknown argument type."
990    
# Line 1727  def eigenvalues(arg): Line 1729  def eigenvalues(arg):
1729        return arg        return arg
1730      elif isinstance(arg,int):      elif isinstance(arg,int):
1731        return float(arg)        return float(arg)
1732        elif isinstance(arg,Basic):
1733          return symfn.eigenvalues(arg)
1734      else:      else:
1735        raise TypeError,"eigenvalues: Unknown argument type."        raise TypeError,"eigenvalues: Unknown argument type."
1736    
# Line 1753  def eigenvalues_and_eigenvectors(arg): Line 1757  def eigenvalues_and_eigenvectors(arg):
1757        return (numpy.array([[arg]],numpy.float_),numpy.ones((1,1),numpy.float_))        return (numpy.array([[arg]],numpy.float_),numpy.ones((1,1),numpy.float_))
1758      elif isinstance(arg,int):      elif isinstance(arg,int):
1759        return (numpy.array([[arg]],numpy.float_),numpy.ones((1,1),numpy.float_))        return (numpy.array([[arg]],numpy.float_),numpy.ones((1,1),numpy.float_))
1760        elif isinstance(arg,Basic):
1761          return symfn.eigenvalues_and_eigenvectors(arg)
1762      else:      else:
1763        raise TypeError,"eigenvalues: Unknown argument type."        raise TypeError,"eigenvalues: Unknown argument type."
1764    

Legend:
Removed from v.3495  
changed lines
  Added in v.3496

  ViewVC Help
Powered by ViewVC 1.1.26