code: def grid(num, ndim, large=False):
      """Build a uniform grid with num points along each of ndim axes."""
      if not large:
          _check_not_too_large(np.power(num, ndim) * ndim)
      x = np.linspace(0, 1, num, dtype="float64")
      w = 1 / (num - 1)
      points = np.stack(
          np.meshgrid(*[x for _ in range(ndim)], indexing="ij"), axis=-1
      )
      return points, w
  
file_path: tf-quant-finance/tf_quant_finance/experimental/finite_difference/methods.py
imports: from autograd import elementwise_grad
  import autograd.numpy
  import pandas
  import sobol_seq
label_desc: Use image node_id 2 for calling a global function with example usage: grid(num, ndim, large) and returns: points,  w