MCPcopy Index your code
hub / github.com/numpy/numpy / _find_map_entry

Method _find_map_entry

numpy/lib/_iotools.py:586–597  ·  view source on GitHub ↗
(cls, dtype)

Source from the content-addressed store, hash-verified

584
585 @classmethod
586 def _find_map_entry(cls, dtype):
587 # if a converter for the specific dtype is available use that
588 for i, (deftype, func, default_def) in enumerate(cls._mapper):
589 if dtype.type == deftype:
590 return i, (deftype, func, default_def)
591
592 # otherwise find an inexact match
593 for i, (deftype, func, default_def) in enumerate(cls._mapper):
594 if np.issubdtype(dtype.type, deftype):
595 return i, (deftype, func, default_def)
596
597 raise LookupError
598
599 def __init__(self, dtype_or_func=None, default=None, missing_values=None,
600 locked=False):

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected