I have python code that produces a list of 3-tuples of numbers x, y and z. I would like to fit z= f(x,y) using scipy curve_fit. Here is some non-working code
A = [(19,20,24), (10,40,28), (10,50,31)]
def func(x,y,a, b):
return x*y*a + b
How can I get python to fit this function to the data in the list A
?
Copyright Notice:Content Author:「Simd」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15413217/fitting-3d-points-python