title: How is numpy.choice different from numpy.randint?
body: <p>I need to sample with replacement from an array A of length n. I want to know how the below two commands are different. If they both give the same result which one is better (in terms of performance etc...)</p>
  
  <pre><code>A[np.random.randint(0, n, n)]
  
  A[np.random.choice(n, n)]
  </code></pre>