def gegenbauer(n, alpha, monic=False):
 base = jacobi(n, (alpha - 0.5), (alpha - 0.5), monic=monic)
 if monic:
  return base
 factor = (((_gam(((2 * alpha) + n)) * _gam((alpha + 0.5))) / _gam((2 * alpha))) / _gam(((alpha + 0.5) + n)))
 base._scale(factor)
 base.__dict__['_eval_func'] = (lambda x: eval_gegenbauer(float(n), alpha, x))
 return base

def gegenbauer ( n , alpha , monic = False ) : base = jacobi ( n , ( alpha - 0.5 ) , ( alpha - 0.5 ) , monic = monic ) if monic : return base factor = ( ( ( _gam ( ( ( 2 * alpha ) + n ) ) * _gam ( ( alpha + 0.5 ) ) ) / _gam ( ( 2 * alpha ) ) ) / _gam ( ( ( alpha + 0.5 ) + n ) ) ) base . _scale ( factor ) base . __dict__ [ '_eval_func' ] = ( lambda x : eval_gegenbauer ( float ( n ) , alpha , x ) ) return base
gegenbauer polynomial .