Why does this error occur:
root = optimize.newton(func=fa,x0=del_dsoil_trys[i])
Traceback (most recent call last): ....
.....
File "<ipython-input-7-0d3c27cb2dad>", line 3, in v_can
v_cans[i+1] = np.sqrt(2*Eks[i]/(yf*m_d*1000))
IndexError: arrays used as indices must be of integer (or boolean) type
Initially the array v_cans = np.zeros((rows,1)). This is distinct from the function v_can above.
My indices [i+1] and [i] are both single value integers, so what can be the problem?