Error solving Matrix equation with numpy
问题 I'm writing my own Newton-Raphson algorithm in Python using sympy and numpy . The code is below but you can ignore this and skip on to the error: CODE def newtonRhapson(fncList, varz, x0): jacob = [] for fnc in fncList: vec = [] for var in varz: res = fnc.diff(var) for i in range(len(varz)): res = res.subs(varz[i], x0[i]) vec.append(res) jacob.append(numpy.array(vec, dtype='float64')) fx0=[] for fnc in fncList: res2 = fnc for i in range(len(varz)): res2 = res2.subs(varz[i], x0[i]) fx0.append