title: numpy generate data from linear function
body: <p>Say I wanted to generate 100 or so data points from a linear function what's the best way to go about it?</p>
  
  <p>An example linear function <code>y = 0.4*x + 3 + delta</code></p>
  
  <p>where delta is a random value drawn from a uniform distribution between -10 and +10</p>
  
  <p>I want delta to be generated for each data point to give some perturbation to the data.</p>
  
  <pre><code>import numpy as np
  
  d = np.random.uniform(-10, 10)
  </code></pre>
  
  <p>This seems to fit the bill for delta although I'm unsure exactly how to generate the rest incorporating this.</p>