(n, x=None, alpha=None, **args)
Generates Laguerre polynomial of degree `n` in `x`.
Generates Laguerre polynomial of degree `n` in `x`.
Generates Laguerre polynomial of degree n in x .
def laguerre_poly(n, x=None, alpha=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 alpha is not None:
        K, alpha = construct_domain(
            alpha, field=True)  # XXX: ground_field=True
    else:
        K, alpha = QQ, QQ(0)

    poly = DMP(dup_laguerre(int(n), alpha, K), K)

    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 laguerre_poly ( n , x = None , alpha = None , * * args ) : if n < 0 : raise ValueError ( "can't generate Laguerre polynomial of degree %s" % n ) if alpha is not None : K , alpha = construct_domain ( alpha , field = True ) # XXX: ground_field=True else : K , alpha = QQ , QQ ( 0 ) poly = DMP ( dup_laguerre ( int ( n ) , alpha , K ) , K ) 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