title: Python random sample of two arrays, but matching indices
body: <p>I have two numpy arrays x and y, which have length 10,000.
  I would like to plot a random subset of 1,000 entries of both x and y.
  Is there an easy way to use the lovely, compact random.sample(population, k) on both x and y to select the same corresponding indices? (The y and x vectors are linked by a function y(x) say.)</p>
  
  <p>Thanks.</p>