class_docstr: :orphan:
  .. warning:: This class is intended for internal use. The interface may change without warning.
  
  Holds collected information for a plotable dataset. 
  Numpy arrays containing x and y coordinates are available as ``dataset.x`` and ``dataset.y``.
  
  After a search has been performed, typically during a call to :func:`dataRect() <pyqtgraph.PlotDataset.dataRect>`, 
  ``dataset.containsNonfinite`` is `True` if any coordinate values are nonfinite (e.g. NaN or inf) or `False` if all 
  values are finite. If no search has been performed yet, ``dataset.containsNonfinite`` is `None`.
  
  For internal use in :class:`PlotDataItem <pyqtgraph.PlotDataItem>`, this class should not be instantiated when no data is available. 
class_docstr_tok: [":","orphan",":","..","warning",":",":","This","class","is","intended","for","internal","use",".","The","interface","may","change","without","warning",".","Holds","collected","information","for","a","plotable","dataset",".","Numpy","arrays","containing","x","and","y","coordinates","are","available","as","``","dataset.x","``","and","``","dataset.y","``",".","After","a","search","has","been","performed",",","typically","during","a","call","to",":","func",":","`","dataRect","(",")","<","pyqtgraph.PlotDataset.dataRect",">","`",",","``","dataset.containsNonfinite","``","is","`","True","`","if","any","coordinate","values","are","nonfinite","(","e.g",".","NaN","or","inf",")","or","`","False","`","if","all","values","are","finite",".","If","no","search","has","been","performed","yet",",","``","dataset.containsNonfinite","``","is","`","None","`",".","For","internal","use","in",":","class",":","`","PlotDataItem","<","pyqtgraph.PlotDataItem",">","`",",","this","class","should","not","be","instantiated","when","no","data","is","available","."]
code: def _getArrayBounds(self, arr, all_finite):
      # here all_finite could be [None, False, True]
      if not all_finite:  # This may contain NaN values and infinites.
          selection = np.isfinite(
              arr
          )  # We are looking for the bounds of the plottable data set. Infinite and Nan are ignored.
          all_finite = (
              selection.all()
          )  # True if all values are finite, False if there are any non-finites
          if not all_finite:
              arr = arr[selection]
      # here all_finite could be [False, True]
  
      try:
          amin = np.min(arr)  # find minimum of all finite values
          amax = np.max(arr)  # find maximum of all finite values
      except ValueError:  # is raised when there are no finite values
          amin = np.nan
          amax = np.nan
      return amin, amax, all_finite
  
imports: import math
  import warnings
  import bisect
  import numpy
  from ..None import debug
  from ..None import functions
  from ..None import getConfigOption
  from ..Qt import QtCore
  from .GraphicsObject import GraphicsObject
  from .PlotCurveItem import PlotCurveItem
  from .ScatterPlotItem import ScatterPlotItem
label_desc: Use image node_id 4 for calling the PlotDataset obj's underlying member method code with example usage: obj._getArrayBounds(arr, all_finite) and returns: amin,  amax,  all_finite