@@ -667,71 +667,5 @@ cdef class BaseMultiIndexCodesEngine(object):
667
667
return False
668
668
669
669
670
-
671
- cdef class MultiIndexObjectEngine(ObjectEngine):
672
- """
673
- provide the same interface as the MultiIndexEngine
674
- but use the IndexEngine for computation
675
-
676
- This provides good performance with samller MI's
677
- """
678
- def get_indexer (self , values ):
679
- # convert a MI to an ndarray
680
- if hasattr (values, ' values' ):
681
- values = values.values
682
- return super (MultiIndexObjectEngine, self ).get_indexer(values)
683
-
684
- cpdef get_loc(self , object val):
685
-
686
- # convert a MI to an ndarray
687
- if hasattr (val, ' values' ):
688
- val = val.values
689
- return super (MultiIndexObjectEngine, self ).get_loc(val)
690
-
691
-
692
- cdef class MultiIndexHashEngine(ObjectEngine):
693
- """
694
- Use a hashing based MultiIndex impl
695
- but use the IndexEngine for computation
696
-
697
- This provides good performance with larger MI's
698
- """
699
-
700
- def _call_monotonic (self , object mi ):
701
- # defer these back to the mi iteself
702
- return (mi.is_monotonic_increasing,
703
- mi.is_monotonic_decreasing,
704
- mi.is_unique)
705
-
706
- def get_backfill_indexer (self , other , limit = None ):
707
- # we coerce to ndarray-of-tuples
708
- values = np.array(self ._get_index_values())
709
- return algos.backfill_object(values, other, limit = limit)
710
-
711
- def get_pad_indexer (self , other , limit = None ):
712
- # we coerce to ndarray-of-tuples
713
- values = np.array(self ._get_index_values())
714
- return algos.pad_object(values, other, limit = limit)
715
-
716
- cpdef get_loc(self , object val):
717
- if is_definitely_invalid_key(val):
718
- raise TypeError (" '{val}' is an invalid key" .format(val = val))
719
-
720
- self ._ensure_mapping_populated()
721
- if not self .unique:
722
- return self ._get_loc_duplicates(val)
723
-
724
- try :
725
- return self .mapping.get_item(val)
726
- except TypeError :
727
- raise KeyError (val)
728
-
729
- def get_indexer (self , values ):
730
- self ._ensure_mapping_populated()
731
- return self .mapping.lookup(values)
732
-
733
- cdef _make_hash_table(self , n):
734
- return _hash.MultiIndexHashTable(n)
735
-
736
670
# Generated from template.
737
671
include " index_class_helper.pxi"
0 commit comments