class_docstr: Distribution based on Bernstein Polynomials on unit hypercube.
  
  Parameters
  ----------
  cdf_grid : array_like
      cdf values on a equal spaced grid of the unit hypercube [0, 1]^d.
      The dimension of the arrays define how many random variables are
      included in the multivariate distribution.
  
  Attributes
  ----------
  cdf_grid : grid of cdf values
  prob_grid : grid of cell or bin probabilities
  k_dim : (int) number of components, dimension of random variable
  k_grid : (tuple) shape of cdf_grid
  k_grid_product : (int) total number of bins in grid
  _grid : Grid instance with helper methods and attributes
class_docstr_tok: ["Distribution","based","on","Bernstein","Polynomials","on","unit","hypercube",".","Parameters","--","--","--","--","--","cdf_grid",":","array_like","cdf","values","on","a","equal","spaced","grid","of","the","unit","hypercube","[","0",",","1","]","^d",".","The","dimension","of","the","arrays","define","how","many","random","variables","are","included","in","the","multivariate","distribution",".","Attributes","--","--","--","--","--","cdf_grid",":","grid","of","cdf","values","prob_grid",":","grid","of","cell","or","bin","probabilities","k_dim",":","(","int",")","number","of","components",",","dimension","of","random","variable","k_grid",":","(","tuple",")","shape","of","cdf_grid","k_grid_product",":","(","int",")","total","number","of","bins","in","grid","_grid",":","Grid","instance","with","helper","methods","and","attributes"]
code: def __init__(self, cdf_grid):
      self.cdf_grid = cdf_grid = np.asarray(cdf_grid)
      self.k_dim = cdf_grid.ndim
      self.k_grid = cdf_grid.shape
      self.k_grid_product = np.prod([i - 1 for i in self.k_grid])
      self._grid = _Grid(self.k_grid)
  
file_path: statsmodels/statsmodels/distributions/bernstein.py
imports: import numpy
  from scipy import stats
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.distributions.tools import _Grid, cdf2prob_grid, prob2cdf_grid, _eval_bernstein_dd, _eval_bernstein_2d, _eval_bernstein_1d
label_desc: Use image node_id 1 to create a new BernsteinDistribution object  with example: obj = BernsteinDistribution(cdf_grid)