I tried to apply the inverse of the error function, scipy.special.erfinv, to a complex input and I received the following error :

from scipy.special import * 
z = 1j 

TypeError: ufunc 'ndtri' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

I checked the ndtri function documentation and it's mentioned that the argument can be "real or complex".

Is the documentation correct ?

My final goal is to obtain the inverse of the imaginary error function which can be evaluated as follows: erfi^-1(x) = -i * erf^-1(i*x)

Any help is appreciated.

0 Answers