parameters: (data, k)
return_statement: return x
docstring: Pick k points at random in data (one row = one observation).
  
      This is done by taking the k first values of a random permutation of 1..N
      where N is the number of observation.
  
      Parameters
      ----------
      data : ndarray
          Expect a rank 1 or 2 array. Rank 1 are assumed to describe one
          dimensional data, rank 2 multidimensional data, in which case one
          row is one observation.
      k : int
          Number of samples to generate.
docstring_summary: Pick k points at random in data (one row = one observation).
docstring_tokens: Pick k points at random in data ( one row = one observation ) .
function: def _kpoints(data, k):
      """Pick k points at random in data (one row = one observation).
  
      This is done by taking the k first values of a random permutation of 1..N
      where N is the number of observation.
  
      Parameters
      ----------
      data : ndarray
          Expect a rank 1 or 2 array. Rank 1 are assumed to describe one
          dimensional data, rank 2 multidimensional data, in which case one
          row is one observation.
      k : int
          Number of samples to generate.
  
      """
      if data.ndim > 1:
          n = data.shape[0]
      else:
          n = data.size
  
      p = np.random.permutation(n)
      x = data[p[:k], :].copy()
  
      return x
function_tokens: def _kpoints ( data , k ) : if data . ndim > 1 : n = data . shape [ 0 ] else : n = data . size p = np . random . permutation ( n ) x = data [ p [ : k ] , : ] . copy ( ) return x