code: def _is_numeric_value(arr, var):
      """
      Checks a variable against non-numeric types such as types, slices,
      empty arrays, and None, that need not be checked for NaN and Inf values.
  
      Parameters
      ----------
      arr : the data of that correspond to any Theano Variable
      var : The corresponding Theano variable
  
      Returns
      -------
      is_non_numeric : bool
          `True` the value is non-numeric.
  
      """
      if isinstance(arr, theano.gof.type._cdata_type):
          return False
      elif isinstance(arr, np.random.mtrand.RandomState):
          return False
      elif var and getattr(var.tag, "is_rng", False):
          return False
      elif isinstance(arr, slice):
          return False
      elif arr is None:
          return False
      elif arr.size == 0:
          return False
      return True
  
file_path: Theano/theano/compile/nanguardmode.py
imports: from __future__ import absolute_import, print_function, division
  import logging
  from six.moves import StringIO
  import numpy
  import theano
  from theano import config
  import theano.tensor
  from theano.compile import Mode
  from theano.compat import ValuesView
  from .mode import get_mode
label_desc: Use image node_id 1 for calling a global function with example usage: _is_numeric_value(arr, var) and returns: True, False, False, False, False, False, False