class_docstr: Register types with conversion interface.
class_docstr_tok: ["Register","types","with","conversion","interface","."]
docstr: Get the converter interface instance for *x*, or None.
docstr_tok: ["Get","the","converter","interface","instance","for","*","x","*",",","or","None","."]
code: def get_converter(self, x):
      """Get the converter interface instance for *x*, or None."""
      # Unpack in case of e.g. Pandas or xarray object
      x = cbook._unpack_to_numpy(x)
  
      if isinstance(x, np.ndarray):
          # In case x in a masked array, access the underlying data (only its
          # type matters).  If x is a regular ndarray, getdata() just returns
          # the array itself.
          x = np.ma.getdata(x).ravel()
          # If there are no elements in x, infer the units from its dtype
          if not x.size:
              return self.get_converter(np.array([0], dtype=x.dtype))
      for cls in type(x).__mro__:  # Look up in the cache.
          try:
              return self[cls]
          except KeyError:
              pass
      try:  # If cache lookup fails, look up based on first element...
          first = cbook._safe_first_finite(x)
      except (TypeError, StopIteration):
          pass
      else:
          # ... and avoid infinite recursion for pathological iterables for
          # which indexing returns instances of the same iterable class.
          if type(first) is not type(x):
              return self.get_converter(first)
      return None
  
file_path: catboost/contrib/python/matplotlib/py3/matplotlib/units.py
imports: from decimal import Decimal
  from numbers import Number
  import numpy
  from numpy import ma
  from matplotlib import cbook
label_desc: Use image node_id 1 for calling the Registry obj's underlying member method code with example usage: obj.get_converter(x) and returns: None, self, self, self