当前位置: 首页>>代码示例>>Python>>正文


Python C.arg方法代码示例

本文整理汇总了Python中sympy.core.C.arg方法的典型用法代码示例。如果您正苦于以下问题:Python C.arg方法的具体用法?Python C.arg怎么用?Python C.arg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sympy.core.C的用法示例。


在下文中一共展示了C.arg方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: as_real_imag

# 需要导入模块: from sympy.core import C [as 别名]
# 或者: from sympy.core.C import arg [as 别名]
    def as_real_imag(self, deep=True, **hints):
        """
        Returns this function as a complex coordinate.

        Examples
        ========

        >>> from sympy import I
        >>> from sympy.abc import x
        >>> from sympy.functions import log
        >>> log(x).as_real_imag()
        (log(Abs(x)), arg(x))
        >>> log(I).as_real_imag()
        (0, pi/2)
        >>> log(1+I).as_real_imag()
        (log(sqrt(2)), pi/4)
        >>> log(I*x).as_real_imag()
        (log(Abs(x)), arg(I*x))

        """
        if deep:
            abs = C.Abs(self.args[0].expand(deep, **hints))
            arg = C.arg(self.args[0].expand(deep, **hints))
        else:
            abs = C.Abs(self.args[0])
            arg = C.arg(self.args[0])
        if hints.get('log', False):  # Expand the log
            hints['complex'] = False
            return (log(abs).expand(deep, **hints), arg)
        else:
            return (log(abs), arg)
开发者ID:AALEKH,项目名称:sympy,代码行数:33,代码来源:exponential.py

示例2: as_real_imag

# 需要导入模块: from sympy.core import C [as 别名]
# 或者: from sympy.core.C import arg [as 别名]
 def as_real_imag(self, deep=True, **hints):
     if deep:
         abs = C.Abs(self.args[0].expand(deep, **hints))
         arg = C.arg(self.args[0].expand(deep, **hints))
     else:
         abs = C.Abs(self.args[0])
         arg = C.arg(self.args[0])
     if hints.get("log", False):  # Expand the log
         hints["complex"] = False
         return (log(abs).expand(deep, **hints), arg)
     else:
         return (log(abs), arg)
开发者ID:streitho,项目名称:KiPyCalc-LearningEnviroment,代码行数:14,代码来源:exponential.py

示例3: _eval_expand_complex

# 需要导入模块: from sympy.core import C [as 别名]
# 或者: from sympy.core.C import arg [as 别名]
 def _eval_expand_complex(self, deep=True, **hints):
     if deep:
         abs = C.abs(self.args[0].expand(deep, **hints))
         arg = C.arg(self.args[0].expand(deep, **hints))
     else:
         abs = C.abs(self.args[0])
         arg = C.arg(self.args[0])
     if hints['log']: # Expand the log
         hints['complex'] = False
         return log(abs).expand(deep, **hints) + S.ImaginaryUnit * arg
     else:
         return log(abs) + S.ImaginaryUnit * arg
开发者ID:Sumith1896,项目名称:sympy-polys,代码行数:14,代码来源:exponential.py


注:本文中的sympy.core.C.arg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。