title: Apply linear transformation to all elements of a numpy array
body: <p>I have a numpy array like this</p>
  
  <pre><code>============ arr_data
  &lt;type 'numpy.ndarray'&gt;
  [[ 269.05515748   24.71801578]
   [ 276.96505874   21.72957922]
   [ 198.32475308   19.26596641]
   ...
   [ 158.11078724  -49.91437661]
   [ 219.79342843  -62.06756014]
   [  69.92358315 -166.19385119]]
  ('arr_data ndim: ', 2)
  ('         size: ', 413410)
  ('        shape: ', (206705, 2))
  ('        dtype: ', dtype('float64'))
  </code></pre>
  
  <p>Visualising this as an array of 206705 vectors (x, y), how can I apply the same linear transformation to every one of the elements in the array?</p>
  
  <p>I imagine it would be a matrix multiplication with a 2x2 diagonal matrix and then adding a vector, i.e.</p>
  
  <pre><code>   (x', y') = ([a, 0], [0, b])(x, y) + (c, d)
  </code></pre>
  
  <p>but I don't know how this would be correctly coded. Could anyone offer any hints, please?</p>