code: def check_is_real(arr, /, *, name="Array"):
      """Check if an array has real numbers, i.e. float or integer type.
  
      Notes
      -----
      Arrays with ``infinity`` or ``NaN`` values are considered real and
      will not raise an error. Use :func:`check_is_finite` to check for
      finite 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
      ------
      TypeError
          If the array does not have real numbers.
  
      See Also
      --------
      check_is_finite
  
      Examples
      --------
      Check if an array has real numbers.
  
      >>> import pyvista.core.input_validation as valid
      >>> valid.check_is_real([1, 2, 3])
  
      """
      arr = arr if isinstance(arr, np.ndarray) else cast_to_ndarray(arr)
  
      # Return early for common cases
      if arr.dtype.type in [np.int32, np.int64, np.float32, np.float64]:
          return
  
      # Do not use np.isreal as it will fail in some cases (e.g. scalars).
      # Check dtype directly instead
      try:
          check_is_subdtype(arr, (np.floating, np.integer), name=name)
      except TypeError as e:
          raise TypeError(f"{name} must have real numbers.") from e
  
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 4 for calling a global function with example usage: check_is_real() without return types