Skip to content

Commit a80e115

Browse files
committed
CLN: remove obsolete MultiIndex engines
1 parent 922686d commit a80e115

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

pandas/_libs/index.pyx

-66
Original file line numberDiff line numberDiff line change
@@ -598,71 +598,5 @@ cpdef convert_scalar(ndarray arr, object value):
598598

599599
return value
600600

601-
602-
cdef class MultiIndexObjectEngine(ObjectEngine):
603-
"""
604-
provide the same interface as the MultiIndexEngine
605-
but use the IndexEngine for computation
606-
607-
This provides good performance with samller MI's
608-
"""
609-
def get_indexer(self, values):
610-
# convert a MI to an ndarray
611-
if hasattr(values, 'values'):
612-
values = values.values
613-
return super(MultiIndexObjectEngine, self).get_indexer(values)
614-
615-
cpdef get_loc(self, object val):
616-
617-
# convert a MI to an ndarray
618-
if hasattr(val, 'values'):
619-
val = val.values
620-
return super(MultiIndexObjectEngine, self).get_loc(val)
621-
622-
623-
cdef class MultiIndexHashEngine(ObjectEngine):
624-
"""
625-
Use a hashing based MultiIndex impl
626-
but use the IndexEngine for computation
627-
628-
This provides good performance with larger MI's
629-
"""
630-
631-
def _call_monotonic(self, object mi):
632-
# defer these back to the mi iteself
633-
return (mi.is_monotonic_increasing,
634-
mi.is_monotonic_decreasing,
635-
mi.is_unique)
636-
637-
def get_backfill_indexer(self, other, limit=None):
638-
# we coerce to ndarray-of-tuples
639-
values = np.array(self._get_index_values())
640-
return algos.backfill_object(values, other, limit=limit)
641-
642-
def get_pad_indexer(self, other, limit=None):
643-
# we coerce to ndarray-of-tuples
644-
values = np.array(self._get_index_values())
645-
return algos.pad_object(values, other, limit=limit)
646-
647-
cpdef get_loc(self, object val):
648-
if is_definitely_invalid_key(val):
649-
raise TypeError("'{val}' is an invalid key".format(val=val))
650-
651-
self._ensure_mapping_populated()
652-
if not self.unique:
653-
return self._get_loc_duplicates(val)
654-
655-
try:
656-
return self.mapping.get_item(val)
657-
except TypeError:
658-
raise KeyError(val)
659-
660-
def get_indexer(self, values):
661-
self._ensure_mapping_populated()
662-
return self.mapping.lookup(values)
663-
664-
cdef _make_hash_table(self, n):
665-
return _hash.MultiIndexHashTable(n)
666-
667601
# Generated from template.
668602
include "index_class_helper.pxi"

0 commit comments

Comments
 (0)