tBuLi / symfit

Symbolic Fitting; fitting as it should be.
http://symfit.readthedocs.org
MIT License
233 stars 17 forks source link

Provide data to Fit as dict instead #252

Open tBuLi opened 5 years ago

tBuLi commented 5 years ago

Perhaps a good improvement on our syntax would be to provide data to Fit as a dict instead:

model = Model({y: a * x + b})
fit = Fit(model, data={x: xdata, y: ydata})

This would have multiple advantages:

tBuLi commented 5 years ago

To criticize my own idea: this will not play nice with code generation, dummy names will still have to be generated then in case of conflicts. But sympy can already do this in fact by setting dummify=True when printing..