Model functions with keyword-only arguments #975
schtandard
started this conversation in
General
Replies: 1 comment 2 replies
-
@schtandard Model functions do not support the bare def foo(x, a=1, b=2, kind='linear'):
if kind == 'linear':
return a + b * x
elif kind == 'exponential':
return a * np.exp(b * x)
mdl = lmfit.Model(foo) will work. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Keyword-only arguments to model functions do not work.
Is this by design? The documentation states
which leads me to expect that keyword-only arguments should work.
Beta Was this translation helpful? Give feedback.
All reactions