environment/share/doc/ipython/examples/parallel/plotting/plotting_backend.py
def downsample(array, k):
    """Choose k random elements of array."""
    length = array.shape[0]
    indices = random.sample(xrange(length), k)
    return array[indices]
def downsample(array, k):
    length = array.shape[0]
    indices = random.sample(xrange(length), k)
    return array[indices]
def downsample ( array , k ) : length = array . shape [ 0 ] indices = random . sample ( xrange ( length ) , k ) return array [ indices ]
Choose k random elements of array.
Choose k random elements of array .