code: def create_korobov_samples(order, dim, base=17797):
      
      values = numpy.empty(dim)
      values[0] = 1
      for idx in range(1, dim):
          values[idx] = base*values[idx-1] % (order+1)
  
      grid = numpy.mgrid[:dim, :order+1]
      out = values[grid[0]] * (grid[1]+1) / (order+1.) % 1.
      return out[:, :order]
docs: Create Korobov lattice samples.
  
      Args:
          order (int):
              The order of the Korobov latice. Defines the number of
              samples.
          dim (int):
              The number of dimensions in the output.
          base (int):
              The number based used to calculate the distribution of values.
  
      Returns (numpy.ndarray):
          Korobov lattice with ``shape == (dim, order)``