title: random sample of two 100X100 multidimensional arrays, with same row no. in python numpy
body: <p>I have two multidimensional array(matrix) in numpy, one being the training set(100,100 dimension) and other being the class label(100X1 dimension) I want to take random samples using np.random.choice but don't know how to figure out taking the same row no. from both matrices.</p>
  
  <p>for eg.,</p>
  
  <pre><code>k=np.random.choice(10,replace=False)
  temp_data=data.ix[k]
  temp_datat=datat.ix[k]
  </code></pre>
  
  <p>would this work for sampling 10 same random rows from both my arrays data and datat?</p>