err3 = np.sqrt(errfunc3(optim3, data[:, (0)], data[:, (1)])).sum()
err2 = np.sqrt(errfunc2(optim2, data[:, (0)], data[:, (1)])).sum()
print("""Residual error when fitting 3 Gaussians: {}
Residual error when fitting 2 Gaussians: {}""".format(
    err3, err2))
Python-load data and do multi Gaussian fit