class_docstr: Object representing heatmaps on a single image.
  
  Parameters
  ----------
  arr : (H,W) ndarray or (H,W,C) ndarray
      Array representing the heatmap(s) on a single image.
      Multiple heatmaps may be provided, in which case ``C`` is expected to
      denote the heatmap index.
      The array must be of dtype ``float32``.
  
  shape : tuple of int
      Shape of the image on which the heatmap(s) is/are placed.
      **Not** the shape of the heatmap(s) array, unless it is identical
      to the image shape (note the likely difference between the arrays
      in the number of channels).
      This is expected to be ``(H, W)`` or ``(H, W, C)`` with ``C`` usually
      being ``3``.
      If there is no corresponding image, use ``(H_arr, W_arr)`` instead,
      where ``H_arr`` is the height of the heatmap(s) array
      (analogous ``W_arr``).
  
  min_value : float, optional
      Minimum value for the heatmaps that `arr` represents. This will
      usually be ``0.0``.
  
  max_value : float, optional
      Maximum value for the heatmaps that `arr` represents. This will
      usually be ``1.0``.
class_docstr_tok: ["Object","representing","heatmaps","on","a","single","image",".","Parameters","--","--","--","--","--","arr",":","(","H",",","W",")","ndarray","or","(","H",",","W",",","C",")","ndarray","Array","representing","the","heatmap","(","s",")","on","a","single","image",".","Multiple","heatmaps","may","be","provided",",","in","which","case","``","C","``","is","expected","to","denote","the","heatmap","index",".","The","array","must","be","of","dtype","``","float32","``",".","shape",":","tuple","of","int","Shape","of","the","image","on","which","the","heatmap","(","s",")","is\/are","placed",".","*","*","Not","*","*","the","shape","of","the","heatmap","(","s",")","array",",","unless","it","is","identical","to","the","image","shape","(","note","the","likely","difference","between","the","arrays","in","the","number","of","channels",")",".","This","is","expected","to","be","``","(","H",",","W",")","``","or","``","(","H",",","W",",","C",")","``","with","``","C","``","usually","being","``","3","``",".","If","there","is","no","corresponding","image",",","use","``","(","H_arr",",","W_arr",")","``","instead",",","where","``","H_arr","``","is","the","height","of","the","heatmap","(","s",")","array","(","analogous","``","W_arr","``",")",".","min_value",":","float",",","optional","Minimum","value","for","the","heatmaps","that","`","arr","`","represents",".","This","will","usually","be","``","0.0","``",".","max_value",":","float",",","optional","Maximum","value","for","the","heatmaps","that","`","arr","`","represents",".","This","will","usually","be","``","1.0","``","."]
docstr: Render the heatmaps as RGB images.
  
  Parameters
  ----------
  size : None or float or iterable of int or iterable of float, optional
      Size of the rendered RGB image as ``(height, width)``.
      See :func:`~imgaug.imgaug.imresize_single_image` for details.
      If set to ``None``, no resizing is performed and the size of the
      heatmaps array is used.
  
  cmap : str or None, optional
      Name of the ``matplotlib`` color map to use when convert the
      heatmaps to RGB images.
      If set to ``None``, no color map will be used and the heatmaps
      will be converted to simple intensity maps.
  
  Returns
  -------
  list of (H,W,3) ndarray
      Rendered heatmaps as ``uint8`` arrays.
      Always a **list** containing one RGB image per heatmap array
      channel.
docstr_tok: ["Render","the","heatmaps","as","RGB","images",".","Parameters","--","--","--","--","--","size",":","None","or","float","or","iterable","of","int","or","iterable","of","float",",","optional","Size","of","the","rendered","RGB","image","as","``","(","height",",","width",")","``",".","See",":","func",":","`","~imgaug.imgaug.imresize_single_image","`","for","details",".","If","set","to","``","None","``",",","no","resizing","is","performed","and","the","size","of","the","heatmaps","array","is","used",".","cmap",":","str","or","None",",","optional","Name","of","the","``","matplotlib","``","color","map","to","use","when","convert","the","heatmaps","to","RGB","images",".","If","set","to","``","None","``",",","no","color","map","will","be","used","and","the","heatmaps","will","be","converted","to","simple","intensity","maps",".","Returns","--","--","--","-","list","of","(","H",",","W,3",")","ndarray","Rendered","heatmaps","as","``","uint8","``","arrays",".","Always","a","*","*","list","*","*","containing","one","RGB","image","per","heatmap","array","channel","."]
code: def draw(self, size=None, cmap="jet"):
      """Render the heatmaps as RGB images.
  
      Parameters
      ----------
      size : None or float or iterable of int or iterable of float, optional
          Size of the rendered RGB image as ``(height, width)``.
          See :func:`~imgaug.imgaug.imresize_single_image` for details.
          If set to ``None``, no resizing is performed and the size of the
          heatmaps array is used.
  
      cmap : str or None, optional
          Name of the ``matplotlib`` color map to use when convert the
          heatmaps to RGB images.
          If set to ``None``, no color map will be used and the heatmaps
          will be converted to simple intensity maps.
  
      Returns
      -------
      list of (H,W,3) ndarray
          Rendered heatmaps as ``uint8`` arrays.
          Always a **list** containing one RGB image per heatmap array
          channel.
  
      """
      heatmaps_uint8 = self.to_uint8()
      heatmaps_drawn = []
  
      for c in sm.xrange(heatmaps_uint8.shape[2]):
          # We use c:c+1 here to get a (H,W,1) array. Otherwise imresize
          # would have to re-attach an axis.
          heatmap_c = heatmaps_uint8[..., c : c + 1]
  
          if size is not None:
              heatmap_c_rs = ia.imresize_single_image(
                  heatmap_c, size, interpolation="nearest"
              )
          else:
              heatmap_c_rs = heatmap_c
          heatmap_c_rs = (
              np.squeeze(heatmap_c_rs).astype(np.float32) / 255.0
          )
  
          if cmap is not None:
              # import only when necessary (faster startup; optional
              # dependency; less fragile -- see issue #225)
              import matplotlib.pyplot as plt
  
              cmap_func = plt.get_cmap(cmap)
              heatmap_cmapped = cmap_func(heatmap_c_rs)
              heatmap_cmapped = np.delete(heatmap_cmapped, 3, 2)
          else:
              heatmap_cmapped = np.tile(
                  heatmap_c_rs[..., np.newaxis], (1, 1, 3)
              )
  
          heatmap_cmapped = np.clip(
              heatmap_cmapped * 255, 0, 255
          ).astype(np.uint8)
  
          heatmaps_drawn.append(heatmap_cmapped)
      return heatmaps_drawn
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  import six.moves
  from ..None import imgaug
  from .base import IAugmentable
label_desc: Use image node_id 3 for calling the HeatmapsOnImage obj's underlying member method code with example usage: obj.draw(size, cmap) and returns: heatmaps_drawn