code: def _guessvartypes(arr):
      """
      Tries to guess the dtypes of the str_ ndarray `arr`.
  
      Guesses by testing element-wise conversion. Returns a list of dtypes.
      The array is first converted to ndarray. If the array is 2D, the test
      is performed on the first line. An exception is raised if the file is
      3D or more.
  
      """
      vartypes = []
      arr = np.asarray(arr)
      if arr.ndim == 2:
          arr = arr[0]
      elif arr.ndim > 2:
          raise ValueError("The array should be 2D at most!")
      # Start the conversion loop.
      for f in arr:
          try:
              int(f)
          except (ValueError, TypeError):
              try:
                  float(f)
              except (ValueError, TypeError):
                  try:
                      complex(f)
                  except (ValueError, TypeError):
                      vartypes.append(arr.dtype)
                  else:
                      vartypes.append(np.dtype(complex))
              else:
                  vartypes.append(np.dtype(float))
          else:
              vartypes.append(np.dtype(int))
      return vartypes
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import warnings
  import numpy
  import numpy.core.numerictypes
  from numpy.compat import basestring
  from numpy import bool_, dtype, ndarray, recarray, array
  from numpy.core.records import fromarrays, fromrecords
  import numpy.ma
  from numpy.ma import MAError, MaskedArray, masked, nomask, masked_array, getdata, getmaskarray, filled
label_desc: Use image node_id 6 for calling a global function with example usage: _guessvartypes(arr) and returns: vartypes