

@defun_wrapped
def gegenbauer(ctx, n, a, z, **kwargs):
    if ctx.isnpint(a):
        return (0 * (z + n))
    if ctx.isnpint((a + 0.5)):
        if ctx.isnpint((n + 1)):
            raise NotImplementedError('Gegenbauer function with two limits')

        def h(a):
            a2 = (2 * a)
            T = ([], [], [(n + a2)], [(n + 1), a2], [(- n), (n + a2)], [(a + 0.5)], (0.5 * (1 - z)))
            return [T]
        return ctx.hypercomb(h, [z], **kwargs)

    def h(n):
        a2 = (2 * a)
        T = ([], [], [(n + a2)], [(n + 1), a2], [(- n), (n + a2)], [(a + 0.5)], (0.5 * (1 - z)))
        return [T]
    return ctx.hypercomb(h, [n], **kwargs)

dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/functions/orthogonal.py gegenbauer/VarMisuse@169/203 `a`->`z`