class_docstr: StatisticsElement provides a baseclass for Element types that
  compute statistics based on the input data, usually a density.
  The value dimension of such elements are therefore usually virtual
  and not computed until the element is plotted.
class_docstr_tok: ["StatisticsElement","provides","a","baseclass","for","Element","types","that","compute","statistics","based","on","the","input","data",",","usually","a","density",".","The","value","dimension","of","such","elements","are","therefore","usually","virtual","and","not","computed","until","the","element","is","plotted","."]
docstr: Return the values along the requested dimension.
  
  Args:
      dimension: The dimension to return values for
      expanded (bool, optional): Whether to expand values
          Whether to return the expanded values, behavior depends
          on the type of data:
            * Columnar: If false returns unique values
            * Geometry: If false returns scalar values per geometry
            * Gridded: If false returns 1D coordinates
      flat (bool, optional): Whether to flatten array
  
  Returns:
      NumPy array of values along the requested dimension
docstr_tok: ["Return","the","values","along","the","requested","dimension",".","Args",":","dimension",":","The","dimension","to","return","values","for","expanded","(","bool",",","optional",")",":","Whether","to","expand","values","Whether","to","return","the","expanded","values",",","behavior","depends","on","the","type","of","data",":","*","Columnar",":","If","false","returns","unique","values","*","Geometry",":","If","false","returns","scalar","values","per","geometry","*","Gridded",":","If","false","returns","1D","coordinates","flat","(","bool",",","optional",")",":","Whether","to","flatten","array","Returns",":","NumPy","array","of","values","along","the","requested","dimension"]
code: def dimension_values(self, dim, expanded=True, flat=True):
      """Return the values along the requested dimension.
  
      Args:
          dimension: The dimension to return values for
          expanded (bool, optional): Whether to expand values
              Whether to return the expanded values, behavior depends
              on the type of data:
                * Columnar: If false returns unique values
                * Geometry: If false returns scalar values per geometry
                * Gridded: If false returns 1D coordinates
          flat (bool, optional): Whether to flatten array
  
      Returns:
          NumPy array of values along the requested dimension
      """
      dim = self.get_dimension(dim, strict=True)
      if dim in self.vdims:
          return np.full(len(self), np.nan)
      return self.interface.values(self, dim, expanded, flat)
  
imports: import numpy
  import param
  from ..core.data import Dataset
  from ..core.dimension import Dimension, process_dimensions
  from ..core.element import Element, Element2D
  from ..core.util import get_param_values, unique_iterator
  from .selection import Selection1DExpr, Selection2DExpr
label_desc: Use image node_id 4 for calling the StatisticsElement obj's underlying member method code with example usage: obj.dimension_values(dim, expanded, flat) and returns: self, np