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"]
docstr: pdf values evaluated at x.
  
  Parameters
  ----------
  x : array_like
      Points of multivariate random variable at which pdf is evaluated.
      This can be a single point with length equal to the dimension of
      the random variable, or two dimensional with points (observations)
      in rows and random variables in columns.
      In the univariate case, a 1-dimensional x will be interpreted as
      different points for evaluation.
  
  Returns
  -------
  cdf values
  
  Notes
  -----
  Warning: 2-dim x with many points can be memory intensive because
  currently the bernstein polynomials will be evaluated in a fully
  vectorized computation.
docstr_tok: ["pdf","values","evaluated","at","x.","Parameters","--","--","--","--","--","x",":","array_like","Points","of","multivariate","random","variable","at","which","pdf","is","evaluated",".","This","can","be","a","single","point","with","length","equal","to","the","dimension","of","the","random","variable",",","or","two","dimensional","with","points","(","observations",")","in","rows","and","random","variables","in","columns",".","In","the","univariate","case",",","a","1-dimensional","x","will","be","interpreted","as","different","points","for","evaluation",".","Returns","--","--","--","-","cdf","values","Notes","--","--","-","Warning",":","2-dim","x","with","many","points","can","be","memory","intensive","because","currently","the","bernstein","polynomials","will","be","evaluated","in","a","fully","vectorized","computation","."]
code: def pdf(self, x):
      """pdf values evaluated at x.
  
      Parameters
      ----------
      x : array_like
          Points of multivariate random variable at which pdf is evaluated.
          This can be a single point with length equal to the dimension of
          the random variable, or two dimensional with points (observations)
          in rows and random variables in columns.
          In the univariate case, a 1-dimensional x will be interpreted as
          different points for evaluation.
  
      Returns
      -------
      cdf values
  
      Notes
      -----
      Warning: 2-dim x with many points can be memory intensive because
      currently the bernstein polynomials will be evaluated in a fully
      vectorized computation.
      """
      x = np.asarray(x)
      if x.ndim == 1 and self.k_dim == 1:
          x = x[:, None]
      # TODO: check usage of k_grid_product. Should this go into eval?
      pdf_ = self.k_grid_product * _eval_bernstein_dd(x, self.prob_grid)
      return pdf_
  
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 5 for calling the BernsteinDistribution obj's underlying member method code with example usage: obj.pdf(x) and returns: pdf_