-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing in a scalar function instead of a vector function #145
Comments
Vectorisation just confuses things and is unnecessary. |
I agree. Vectorization should be the package authors' job, instead of the users'. Or we can recommend an always-multivariable API, say, the user can always assume that the model is a multivariable function, and user write the model as like |
I agree |
I've found a pretty convincing case for this (if it wasn't already): function model(x, p)
a = p[1:3:end]
m = p[2:3:end]
w = p[3:3:end]
return exp.(-(x .- m').^2 ./ (2w' .^ 2))*a
end i.e. a normal [no pun intended] sum-of-gaussians. This returns a vector just fine when |
It should be possible to pass in a scalar function to fit instead of vectorising it.
The text was updated successfully, but these errors were encountered: