function.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:Python-iBeacon-Scan 作者: NikNitro 项目源码 文件源码
def _coeff_isneg(a):
    """Return True if the leading Number is negative.

    Examples
    ========

    >>> from sympy.core.function import _coeff_isneg
    >>> from sympy import S, Symbol, oo, pi
    >>> _coeff_isneg(-3*pi)
    True
    >>> _coeff_isneg(S(3))
    False
    >>> _coeff_isneg(-oo)
    True
    >>> _coeff_isneg(Symbol('n', negative=True)) # coeff is 1
    False

    """

    if a.is_Mul:
        a = a.args[0]
    return a.is_Number and a.is_negative
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号