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


Python Poly.as_basic方法代码示例

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


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

示例1: cyclotomic_poly

# 需要导入模块: from sympy.polys.polytools import Poly [as 别名]
# 或者: from sympy.polys.polytools.Poly import as_basic [as 别名]
def cyclotomic_poly(n, x=None, **args):
    """Generates cyclotomic polynomial of order `n` in `x`. """
    if n <= 0:
        raise ValueError("can't generate cyclotomic polynomial of order %s" % n)

    if x is not None:
        x = sympify(x)
    else:
        x = Symbol('x', dummy=True)

    poly = Poly(DMP(dup_zz_cyclotomic_poly(int(n), ZZ), ZZ), x)

    if not args.get('polys', False):
        return poly.as_basic()
    else:
        return poly
开发者ID:Sumith1896,项目名称:sympy-polys,代码行数:18,代码来源:specialpolys.py

示例2: hermite_poly

# 需要导入模块: from sympy.polys.polytools import Poly [as 别名]
# 或者: from sympy.polys.polytools.Poly import as_basic [as 别名]
def hermite_poly(n, x=None, **args):
    """Generates Hermite polynomial of degree `n` in `x`. """
    if n < 0:
        raise ValueError("can't generate Hermite polynomial of degree %s" % n)

    if x is not None:
        x = sympify(x)
    else:
        x = Dummy('x')

    poly = Poly(DMP(dup_hermite(int(n), ZZ), ZZ), x)

    if not args.get('polys', False):
        return poly.as_basic()
    else:
        return poly
开发者ID:Aang,项目名称:sympy,代码行数:18,代码来源:orthopolys.py

示例3: chebyshevt_poly

# 需要导入模块: from sympy.polys.polytools import Poly [as 别名]
# 或者: from sympy.polys.polytools.Poly import as_basic [as 别名]
def chebyshevt_poly(n, x=None, **args):
    """Generates Chebyshev polynomial of the first kind of degree `n` in `x`. """
    if n < 0:
        raise ValueError("can't generate 1st kind Chebyshev polynomial of degree %s" % n)

    if x is not None:
        x = sympify(x)
    else:
        x = Symbol('x', dummy=True)

    poly = Poly(DMP(dup_chebyshevt(int(n), ZZ), ZZ), x)

    if not args.get('polys', False):
        return poly.as_basic()
    else:
        return poly
开发者ID:Sumith1896,项目名称:sympy-polys,代码行数:18,代码来源:orthopolys.py

示例4: chebyshevu_poly

# 需要导入模块: from sympy.polys.polytools import Poly [as 别名]
# 或者: from sympy.polys.polytools.Poly import as_basic [as 别名]
def chebyshevu_poly(n, x=None, **args):
    """Generates Chebyshev polynomial of the second kind of degree `n` in `x`. """
    if n < 0:
        raise ValueError("can't generate 2nd kind Chebyshev polynomial of degree %s" % n)

    if x is not None:
        x = sympify(x)
    else:
        x = Dummy('x')

    poly = Poly(DMP(dup_chebyshevu(int(n), ZZ), ZZ), x)

    if not args.get('polys', False):
        return poly.as_basic()
    else:
        return poly
开发者ID:Aang,项目名称:sympy,代码行数:18,代码来源:orthopolys.py

示例5: laguerre_poly

# 需要导入模块: from sympy.polys.polytools import Poly [as 别名]
# 或者: from sympy.polys.polytools.Poly import as_basic [as 别名]
def laguerre_poly(n, x=None, **args):
    """Generates Laguerre polynomial of degree `n` in `x`. """
    if n < 0:
        raise ValueError("can't generate Laguerre polynomial of degree %s" % n)

    if x is not None:
        x = sympify(x)
    else:
        x = Symbol('x', dummy=True)

    poly = Poly(DMP(dup_laguerre(int(n), QQ), QQ), x)

    if not args.get('polys', False):
        return poly.as_basic()
    else:
        return poly
开发者ID:Sumith1896,项目名称:sympy-polys,代码行数:18,代码来源:orthopolys.py


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