parameters: (x)
docstring: Check if input is of a scalar integer type (so ``5`` and ``array(5)`` will
      pass, while ``5.0`` and ``array([5])`` will fail.
docstring_summary: Check if input is of a scalar integer type (so ``5`` and ``array(5)`` will
      pass, while ``5.0`` and ``array([5])`` will fail.
docstring_tokens: Check if input is of a scalar integer type ( so 5 and array ( 5 ) will pass while 5 . 0 and array ( [ 5 ] ) will fail .
function: def _is_int_type(x):
      """
      Check if input is of a scalar integer type (so ``5`` and ``array(5)`` will
      pass, while ``5.0`` and ``array([5])`` will fail.
      """
      if np.ndim(x) != 0:
          # Older versions of numpy did not raise for np.array([1]).__index__()
          # This is safe to remove when support for those versions is dropped
          return False
      try:
          operator.index(x)
      except TypeError:
          return False
      else:
          return True
function_tokens: def _is_int_type ( x ) : if np . ndim ( x ) != 0 : # Older versions of numpy did not raise for np.array([1]).__index__() # This is safe to remove when support for those versions is dropped return False try : operator . index ( x ) except TypeError : return False else : return True