def func(x, a, b, c):
    output = np.array([a * x ** b + c, a * x ** b + c + 1])
return output.ravel()
ydata = np.array([[1, 2], [3, 4], [5, 6], [7, 8]], dtype=float)
How to properly define vector function for scipy's curve_fit