Category : integral

I have a code which calculates the overlap between the two data. columms = Ex.columns.values == Ey.columns.values rows = Ex.index.values == Ey.index.values length = Ex.columns.values.astype(‘float64’) height = Ex.index.values.astype(‘float64’) E_overlap = Ex.copy() for i in range(length.size): for j in range(height.size): if i + 1 == length.size: dx = length[i] – length[i – 1] else: dx = ..

Read more

I want to run an integral for different values of "e" and "m" and put the results in a list. m =[0.14, 0.14, 0.14, 1.30, 4.50] e = [2/3, -1/3, -1/3, 2/3, -1/3] def f(z, r): return ((e)**2)*(alpha_elm*Nc/2*np.pi**2)*(4)*(Q2)*(z**2)*((1-z)**2)*((scipy.special.k0(r*(z*(1-z)*Q2 + (m**2))))**2) integrate.nquad(f, [[0, 1],[0, np.inf]]) how can i do that? Source: Python..

Read more