I'm trying to compute the upper incomplete gamma function defined like in this post. If I use
from scipy.special import gamma,gammainc
from numpy import linspace
a = 0
z = (2+3j)*np.linspace(0,10)
gamma(a)*(1-gammainc(a,z))
where z
is a complex vector I get an error
TypeError: ufunc 'gammainc' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Is there an alternative function to do the calculation? There doesn't seem to be a problem when I try to do this with WolframAlpha's Gamma
function.