Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use assume() on find_fit

Hi everyone,

does anyone know how I can use assumptions with find_fit? A minimal example would be

var('a,b,x')
assume(a>0,b>0)
find_fit([(2,2),(3,2.9),(4,4.1)],(a+1)/b*x,variables=[x],initial_guess=(-2,-2))

and the output is

[a == -105.66654155674746, b == -104.30685450333799]

Any help or hint on where to find a solution is appriciated. Thanks in advance.