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: Construct a new HeatmapsOnImage object.
docstr_tok: ["Construct","a","new","HeatmapsOnImage","object","."]
code: def __init__(self, arr, shape, min_value=0.0, max_value=1.0):
      """Construct a new HeatmapsOnImage object."""
      assert ia.is_np_array(arr), (
          "Expected numpy array as heatmap input array, "
          "got type %s" % (type(arr),)
      )
      # TODO maybe allow 0-sized heatmaps? in that case the min() and max()
      #      must be adjusted
      assert arr.shape[0] > 0 and arr.shape[1] > 0, (
          "Expected numpy array as heatmap with height and width greater "
          "than 0, got shape %s." % (arr.shape,)
      )
      assert arr.dtype.name in ["float32"], (
          "Heatmap input array expected to be of dtype float32, "
          "got dtype %s." % (arr.dtype,)
      )
      assert arr.ndim in [
          2,
          3,
      ], "Heatmap input array must be 2d or 3d, got shape %s." % (
          arr.shape,
      )
      assert len(shape) in [2, 3], (
          "Argument 'shape' in HeatmapsOnImage expected to be 2d or 3d, "
          "got shape %s." % (shape,)
      )
      assert min_value < max_value, (
          "Expected min_value to be lower than max_value, "
          "got %.4f and %.4f" % (min_value, max_value)
      )
  
      eps = np.finfo(arr.dtype).eps
      components = arr.flat[0:50]
      beyond_min = np.min(components) < min_value - eps
      beyond_max = np.max(components) > max_value + eps
      if beyond_min or beyond_max:
          ia.warn(
              "Value range of heatmap was chosen to be (%.8f, %.8f), but "
              "found actual min/max of (%.8f, %.8f). Array will be "
              "clipped to chosen value range."
              % (min_value, max_value, np.min(arr), np.max(arr))
          )
          arr = np.clip(arr, min_value, max_value)
  
      if arr.ndim == 2:
          arr = arr[..., np.newaxis]
          self.arr_was_2d = True
      else:
          self.arr_was_2d = False
  
      min_is_zero = 0.0 - eps < min_value < 0.0 + eps
      max_is_one = 1.0 - eps < max_value < 1.0 + eps
      if min_is_zero and max_is_one:
          self.arr_0to1 = arr
      else:
          self.arr_0to1 = (arr - min_value) / (max_value - min_value)
  
      self.shape = shape
  
      self.min_value = min_value
      self.max_value = max_value
  
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 1 to create a new HeatmapsOnImage object from inherited base classes: IAugmentable with example: obj = HeatmapsOnImage(arr, shape, min_value, max_value)