code: def check_is_finite(arr, /, *, name="Array"):
      """Check if an array has finite values, i.e. no NaN or Inf values.
  
      Parameters
      ----------
      arr : array_like
          Array to check.
  
      name : str, default: "Array"
          Variable name to use in the error messages if any are raised.
  
      Raises
      ------
      ValueError
          If the array has any ``Inf`` or ``NaN`` values.
  
      See Also
      --------
      check_is_real
  
      Examples
      --------
      Check if an array's values are finite.
  
      >>> import pyvista.core.input_validation as valid
      >>> valid.check_is_finite([1, 2, 3])
  
      """
      arr = arr if isinstance(arr, np.ndarray) else cast_to_ndarray(arr)
      if not np.all(np.isfinite(arr)):
          raise ValueError(f"{name} must have finite values.")
  
imports: from collections.abc import Iterable, Sequence
  from numbers import Number
  from typing import Tuple, Union, get_args, get_origin
  import numpy
  from pyvista.core.utilities.arrays import cast_to_ndarray
label_desc: Use image node_id 6 for calling a global function with example usage: check_is_finite() without return types