parameters: (dtype)
docstring: Find the correct dtype converter. Adapted from matplotlib
docstring_summary: Find the correct dtype converter. Adapted from matplotlib
docstring_tokens: Find the correct dtype converter . Adapted from matplotlib
function: def _getconv(dtype):
      """ Find the correct dtype converter. Adapted from matplotlib """
  
      def floatconv(x):
          x.lower()
          if '0x' in x:
              return float.fromhex(x)
          return float(x)
  
      typ = dtype.type
      if issubclass(typ, np.bool_):
          return lambda x: bool(int(x))
      if issubclass(typ, np.uint64):
          return np.uint64
      if issubclass(typ, np.int64):
          return np.int64
      if issubclass(typ, np.integer):
          return lambda x: int(float(x))
      elif issubclass(typ, np.longdouble):
          return np.longdouble
      elif issubclass(typ, np.floating):
          return floatconv
      elif issubclass(typ, complex):
          return lambda x: complex(asstr(x).replace('+-', '-'))
      elif issubclass(typ, np.bytes_):
          return asbytes
      elif issubclass(typ, np.unicode_):
          return asunicode
      else:
          return asstr
function_tokens: def _getconv ( dtype ) : def floatconv ( x ) : x . lower ( ) if '0x' in x : return float . fromhex ( x ) return float ( x ) typ = dtype . type if issubclass ( typ , np . bool_ ) : return lambda x : bool ( int ( x ) ) if issubclass ( typ , np . uint64 ) : return np . uint64 if issubclass ( typ , np . int64 ) : return np . int64 if issubclass ( typ , np . integer ) : return lambda x : int ( float ( x ) ) elif issubclass ( typ , np . longdouble ) : return np . longdouble elif issubclass ( typ , np . floating ) : return floatconv elif issubclass ( typ , complex ) : return lambda x : complex ( asstr ( x ) . replace ( '+-' , '-' ) ) elif issubclass ( typ , np . bytes_ ) : return asbytes elif issubclass ( typ , np . unicode_ ) : return asunicode else : return asstr