class_docstr: Interface for 2 or 3D arrays representing images
  of raw luminance values, RGB values or HSV values.
class_docstr_tok: ["Interface","for","2","or","3D","arrays","representing","images","of","raw","luminance","values",",","RGB","values","or","HSV","values","."]
docstr: Sample the Raster along one or both of its dimensions,
  returning a reduced dimensionality type, which is either
  a ItemTable, Curve or Scatter. If two dimension samples
  and a new_xaxis is provided the sample will be the value
  of the sampled unit indexed by the value in the new_xaxis
  tuple.
docstr_tok: ["Sample","the","Raster","along","one","or","both","of","its","dimensions",",","returning","a","reduced","dimensionality","type",",","which","is","either","a","ItemTable",",","Curve","or","Scatter",".","If","two","dimension","samples","and","a","new_xaxis","is","provided","the","sample","will","be","the","value","of","the","sampled","unit","indexed","by","the","value","in","the","new_xaxis","tuple","."]
code: def sample(cls, dataset, samples=None):
      """
      Sample the Raster along one or both of its dimensions,
      returning a reduced dimensionality type, which is either
      a ItemTable, Curve or Scatter. If two dimension samples
      and a new_xaxis is provided the sample will be the value
      of the sampled unit indexed by the value in the new_xaxis
      tuple.
      """
      if samples is None:
          samples = []
      if len(samples[0]) == 1:
          select = {dataset.kdims[0].name: [s[0] for s in samples]}
          return tuple(dataset.select(**select).columns().values())
      return [
          c + (dataset.data[dataset._coord2matrix(c)],) for c in samples
      ]
  
imports: import numpy
  from ..None import util
  from ..boundingregion import BoundingBox
  from ..dimension import dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check
  from ..sheetcoords import SheetCoordinateSystem, Slice
  from .grid import GridInterface
  from .interface import DataError, Interface
  from .util import finite_range
label_desc: Use image node_id 14 for calling the ImageInterface obj's underlying member method code with example usage: obj.sample(cls, dataset, samples) and returns: unknown, tuple