コード例 #1
0
ファイル: ccode.py プロジェクト: fperez/sympy
 def _print_Function(self, expr):
     if expr.func.__name__ == "ceiling":
         return "ceil(%s)" % self.stringify(expr.args, ", ")
     elif expr.func.__name__ == "abs" and not expr.args[0].is_integer:
         return "fabs(%s)" % self.stringify(expr.args, ", ")
     else:
         return StrPrinter._print_Function(self, expr)
コード例 #2
0
ファイル: ccode.py プロジェクト: laudehenri/rSymPy
 def _print_Function(self, expr):
     if expr.func.__name__ == "ceiling":
         return "ceil(%s)" % self.stringify(expr.args, ", ")
     elif expr.func.__name__ == "abs" and not expr.args[0].is_integer:
         return "fabs(%s)" % self.stringify(expr.args, ", ")
     else:
         return StrPrinter._print_Function(self, expr)
コード例 #3
0
ファイル: python.py プロジェクト: devs1991/test_edx_docmode
 def _print_Function(self, expr):
     func = expr.func.__name__
     if not hasattr(sympy, func) and not func in self.functions:
         self.functions.append(func)
     return StrPrinter._print_Function(self, expr)
コード例 #4
0
ファイル: python.py プロジェクト: aeberspaecher/sympy
 def _print_Function(self, expr):
     func = expr.func.__name__
     if not hasattr(sympy, func) and not func in self.functions:
         self.functions.append(func)
     return StrPrinter._print_Function(self, expr)