I am solving a physical problem in which I have to work with the unbounded radial solution of the Schroedinger equation in the presence of a point-like charged particle Zeff.
I define the UNBRWAVE function in python as:
import numpy as np
import math as mh
from mpmath import *
a0 = 1/3.7 #edited new
Zeff = 1.0 #edited new
def UNBRWAVE(r, k, L, n, l):
return (2.0*np.pi)**(3.0/2.0)*(2.0*k*r)**L*(np.sqrt(2.0/np.pi)*np.abs(mh.gamma(L+1.0-(1j*Zeff)/(k*a0)))*np.exp(np.pi*Zeff/(2.0*k*a0)))/nh.gamma(2.0*L+1.0+1.0)*np.exp(-1j*k*r)*hyp1f1(L+1.0-(1j*Zeff)/(k*a0), 2.0*(L+1.0), 2.0*1j*k*r)
Where Zeff=1, 1j is the imaginary unit and hyp1f1 is the hypergeometric 1F1 function. The input parameters are r(a real number), k (a real number), L (an integer number), n (an integer number), l(an integer number). Whenever I call this function, like in
UNBRWAVE(10.0, 5.0, 5, 1, 0)
I get the error message
TypeError: can't convert complex to float
I am new in python so I would like to know how to code better this complex function of real arguments to get the values and perform operations with them.