My first script doesn't return the result of the whole input list, and the second one doesnt return iterable tuple. Any advice?
input= [0.1, 0.2]
def newvalue():
for i in input:
value=integrate.quad(lambda i:(np.exp(-i))/i,i,np.inf)
return value[0]
print(newvalue()) #1.8229239584193715
If I use the following script it does the work and it prints all the values which results from the input list, but the problem with this script that I can't iterate through the calculated values.
for i in input:
value = integrate.quad(lambda i: (np.exp(-i)) / i, i, np.inf)
print(value[0]) #1.8229239584193715
#1.2226505441838773