Scipy stats.skew -- IndexError: tuple index out of range
Question: I am getting a wierd error.... this doesn't happen if I use np.random.random
instead of np.random.randint

    
    
    >>> import numpy as np
    >>> import scipy.stats as stats
    >>> rdata = np.random.randint(5000)
    >>> skew = stats.skew(rdata)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.7/dist-packages/scipy/stats/stats.py", line 989, in skew
        n = a.shape[axis]
    IndexError: tuple index out of range
    


Answer: Take a closer look at the docstrings for
[`numpy.random.randint`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html)
and
[`numpy.random.random`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.random.html).
`numpy.random.randint(5000)` returns a _single_ random integer between 0 and
4999 (inclusive). `numpy.random.random(5000)` returns an array of 5000 samples
from the uniform distibution on 0 <= x < 1.

