@elliotwoods great thanks for that.
i thought that might be the case, that my random values are the reason for the non-matching output.
i am planning to fit pan+tilt angles for an axis PTZ camera to x/y locations seen by a wide angle USB camera.
so, i think the relation between x/y and angles will be less random and nPolyfit will give me better results.
next step collect this data and see.