y=betaln(a,b) returns the natural logarithm of the absolute value of beta: ln(abs(beta(x))).
scipy.special.beta
scipy.special.betainc