python polyfit error due to decimals
<p>I have a couple of Python lists (lets say 'x' and 'y'), in which the numbers are all 'Decimals', using the 'decimal' module. I need this because the numbers are precise to many decimal places.</p>

<p>I then need to take the gradient of a plot of y versus x using</p>

<pre><code>slope,intercept = np.polyfit(x,y,1)
</code></pre>

<p>but I get the following error:</p>

<pre><code>TypeError: unsupported operand type(s) for +: 'Decimal' and 'float'
</code></pre>

<p>I assume that the polyfit doesn't like me using decimals in this way? Is there any way around it?</p>

<p>Thank you!</p>
