(n, x=None, **args)
Generates Chebyshev polynomial of the first kind of degree `n` in `x`.
Generates Chebyshev polynomial of the first kind of degree `n` in `x`.
Generates Chebyshev polynomial of the first kind of degree n in x .
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)

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

    if x is not None:
        poly = Poly.new(poly, x)
    else:
        poly = PurePoly.new(poly, Dummy('x'))

    if not args.get('polys', False):
        return poly.as_expr()
    else:
        return poly
def chebyshevt_poly ( n , x = None , * * args ) : if n < 0 : raise ValueError ( "can't generate 1st kind Chebyshev polynomial of degree %s" % n ) poly = DMP ( dup_chebyshevt ( int ( n ) , ZZ ) , ZZ ) if x is not None : poly = Poly . new ( poly , x ) else : poly = PurePoly . new ( poly , Dummy ( 'x' ) ) if not args . get ( 'polys' , False ) : return poly . as_expr ( ) else : return poly