'Returns the n-th non-central moment of the crystalball function.'

def _munp(self, n, beta, m):

    N = (1.0 / ((((m / beta) / (m - 1)) * np.exp(((- (beta ** 2)) / 2.0))) + (_norm_pdf_C * _norm_cdf(beta))))
    def n_th_moment(n, beta, m):
        '\n                                                Returns    n-th    moment.    Defined    only    if    n+1    <    m\n                                                Function    cannot    broadcast    due    to    the    loop    over    n\n                                                '
        A = (((m / beta) ** m) * np.exp(((- (beta ** 2)) / 2.0)))
        B = ((m / beta) - beta)
        rhs = (((2 ** ((n - 1) / 2.0)) * sc.gamma(((n + 1) / 2))) * (1.0 + (((-1) ** n) * sc.gammainc(((n + 1) / 2), ((beta ** 2) / 2)))))
        lhs = np.zeros(rhs.shape)
        for k in range((n + 1)):
            lhs += ((((sc.binom(n, k) * (B ** (n - k))) * ((-1) ** k)) / ((m - k) - 1)) * ((m / beta) ** (((- m) + k) + 1)))
        return ((A * lhs) + rhs)
    return (N * _lazywhere(np.atleast_1d(((n + 1) < m)), (n, beta, m), np.vectorize(n_th_moment, otypes=[np.float]), np.inf))
