multivariable non-linear curve_fit with scipy
问题 I have been trying to use scipy.optimize curve_fit using multiple variables. It works fine with the test code I created but when I try to implement this on my actual data I keep getting the following error TypeError: only arrays length -1 can be converted to python scalars The shape of the arrays and the data types of their elements in my test code and actual code are exactly the same so I am confused as to why I get this error. Test code: import numpy as np import scipy from scipy.optimize