I'm using matplotlib 0.71 and I think I found a bug in polyfit.
This simple linear regression on two data points gives the correct answer:
array([ -2703.12505517, 1979397.10294428])
However, if I multiply my x values by 1000 the result is wrong:
array([ 5.17650790e-009, 8.28496211e+002])
Could that be some kind of overflow problem ???