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