code: def multigrid(bounds, points_count):
      
      if len(bounds)==1:
          return np.linspace(bounds[0][0], bounds[0][1], points_count).reshape(points_count, 1)
      x_grid_rows = np.meshgrid(*[np.linspace(b[0], b[1], points_count) for b in bounds])
      x_grid_columns = np.vstack([x.flatten(order='F') for x in x_grid_rows]).T
      return x_grid_columns
docs: Generates a multidimensional lattice
      :param bounds: box constraints
      :param points_count: number of points per dimension.