title: Difference between various numpy random functions
body: <p>The <a href="http://docs.scipy.org/doc/numpy/reference/routines.random.html" rel="noreferrer">numpy.random</a> module defines the following 4 functions that all seem to return a float betweeb [0, 1.0) from the continuous uniform distribution. What (if any) is the difference between these functions?</p>
  <blockquote>
  <p>random_sample([size])     Return random floats in the half-open interval [0.0, 1.0).</p>
  <p>random([size])    Return random floats in the half-open interval [0.0, 1.0).</p>
  <p>ranf([size])  Return random floats in the half-open interval [0.0, 1.0).</p>
  <p>sample([size])    Return random floats in the half-open interval [0.0, 1.0).</p>
  </blockquote>
  <p>--------------------------- Edit Follows ---------------------------------------</p>
  <p>I found the following in <code>numpy.random</code> source code that supports @askewchan's answer:</p>
  <pre><code># Some aliases:
  ranf = random = sample = random_sample
  __all__.extend(['ranf','random','sample'])
  </code></pre>