def func_impl(x, num, pitch): return float(cp.cp_int(x, pitch)) / (x**3) - num
print(wr[-1]**2, wr2[-1]) print("wr^2: ", wr2) den = numpy.dot(numpy.pi * rho * (R**5), wr2) print("den: ", den) numero = numpy.multiply(2 * Qa, numpy.reciprocal(den)) #print("SHAPE: ", numpy.shape(datadata[0:18390,6])) #print("SHAPE: ", numpy.shape(den)) #numero = numpy.multiply(2*1000*datadata[0:5709,6]+inert[0:5709], numpy.reciprocal(den[0:5709])) print("numero: ", numero) def funz(x, num, pitch): return float(cp.cp_int(x, pitch)) / (x**3) - num b = float(cp.cp_int(10, 1)) print("b: ", b) a = optim.fsolve(funz, 10, args=(float(numero[0]), float(pitch_vec[0]))) print("a: ", a) vento = numpy.array([0]) tsrres = numpy.array([2.4]) for j in range(len(numero)): if j == 0: (vento, infos, ier, msg) = optim.fsolve(funz, 2.4, args=(numero[j], pitch_vec[j]), full_output=1) tsrres = vento if ier == 1: vento = wr[j] * R / vento