@@ -369,31 +369,6 @@ ctypedef fused algos_t:
369369 uint8_t
370370
371371
372- # TODO: unused; needed?
373- @ cython.wraparound (False )
374- @ cython.boundscheck (False )
375- cpdef map_indices(ndarray[algos_t] index):
376- """
377- Produce a dict mapping the values of the input array to their respective
378- locations.
379-
380- Example:
381- array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}
382-
383- Better to do this with Cython because of the enormous speed boost.
384- """
385- cdef:
386- Py_ssize_t i, length
387- dict result = {}
388-
389- length = len (index)
390-
391- for i in range (length):
392- result[index[i]] = i
393-
394- return result
395-
396-
397372@ cython.boundscheck (False )
398373@ cython.wraparound (False )
399374def pad (ndarray[algos_t] old , ndarray[algos_t] new , limit = None ):
@@ -458,20 +433,6 @@ def pad(ndarray[algos_t] old, ndarray[algos_t] new, limit=None):
458433 return indexer
459434
460435
461- pad_float64 = pad[" float64_t" ]
462- pad_float32 = pad[" float32_t" ]
463- pad_object = pad[" object" ]
464- pad_int64 = pad[" int64_t" ]
465- pad_int32 = pad[" int32_t" ]
466- pad_int16 = pad[" int16_t" ]
467- pad_int8 = pad[" int8_t" ]
468- pad_uint64 = pad[" uint64_t" ]
469- pad_uint32 = pad[" uint32_t" ]
470- pad_uint16 = pad[" uint16_t" ]
471- pad_uint8 = pad[" uint8_t" ]
472- pad_bool = pad[" uint8_t" ]
473-
474-
475436@ cython.boundscheck (False )
476437@ cython.wraparound (False )
477438def pad_inplace (ndarray[algos_t] values ,
@@ -509,15 +470,6 @@ def pad_inplace(ndarray[algos_t] values,
509470 val = values[i]
510471
511472
512- pad_inplace_float64 = pad_inplace[" float64_t" ]
513- pad_inplace_float32 = pad_inplace[" float32_t" ]
514- pad_inplace_object = pad_inplace[" object" ]
515- pad_inplace_int64 = pad_inplace[" int64_t" ]
516- pad_inplace_int32 = pad_inplace[" int32_t" ]
517- pad_inplace_uint64 = pad_inplace[" uint64_t" ]
518- pad_inplace_bool = pad_inplace[" uint8_t" ]
519-
520-
521473@ cython.boundscheck (False )
522474@ cython.wraparound (False )
523475def pad_2d_inplace (ndarray[algos_t , ndim = 2 ] values,
@@ -557,15 +509,6 @@ def pad_2d_inplace(ndarray[algos_t, ndim=2] values,
557509 val = values[j, i]
558510
559511
560- pad_2d_inplace_float64 = pad_2d_inplace[" float64_t" ]
561- pad_2d_inplace_float32 = pad_2d_inplace[" float32_t" ]
562- pad_2d_inplace_object = pad_2d_inplace[" object" ]
563- pad_2d_inplace_int64 = pad_2d_inplace[" int64_t" ]
564- pad_2d_inplace_int32 = pad_2d_inplace[" int32_t" ]
565- pad_2d_inplace_uint64 = pad_2d_inplace[" uint64_t" ]
566- pad_2d_inplace_bool = pad_2d_inplace[" uint8_t" ]
567-
568-
569512"""
570513Backfilling logic for generating fill vector
571514
@@ -657,20 +600,6 @@ def backfill(ndarray[algos_t] old, ndarray[algos_t] new, limit=None):
657600 return indexer
658601
659602
660- backfill_float64 = backfill[" float64_t" ]
661- backfill_float32 = backfill[" float32_t" ]
662- backfill_object = backfill[" object" ]
663- backfill_int64 = backfill[" int64_t" ]
664- backfill_int32 = backfill[" int32_t" ]
665- backfill_int16 = backfill[" int16_t" ]
666- backfill_int8 = backfill[" int8_t" ]
667- backfill_uint64 = backfill[" uint64_t" ]
668- backfill_uint32 = backfill[" uint32_t" ]
669- backfill_uint16 = backfill[" uint16_t" ]
670- backfill_uint8 = backfill[" uint8_t" ]
671- backfill_bool = backfill[" uint8_t" ]
672-
673-
674603@ cython.boundscheck (False )
675604@ cython.wraparound (False )
676605def backfill_inplace (ndarray[algos_t] values ,
@@ -708,15 +637,6 @@ def backfill_inplace(ndarray[algos_t] values,
708637 val = values[i]
709638
710639
711- backfill_inplace_float64 = backfill_inplace[" float64_t" ]
712- backfill_inplace_float32 = backfill_inplace[" float32_t" ]
713- backfill_inplace_object = backfill_inplace[" object" ]
714- backfill_inplace_int64 = backfill_inplace[" int64_t" ]
715- backfill_inplace_int32 = backfill_inplace[" int32_t" ]
716- backfill_inplace_uint64 = backfill_inplace[" uint64_t" ]
717- backfill_inplace_bool = backfill_inplace[" uint8_t" ]
718-
719-
720640@ cython.boundscheck (False )
721641@ cython.wraparound (False )
722642def backfill_2d_inplace (ndarray[algos_t , ndim = 2 ] values,
@@ -756,15 +676,6 @@ def backfill_2d_inplace(ndarray[algos_t, ndim=2] values,
756676 val = values[j, i]
757677
758678
759- backfill_2d_inplace_float64 = backfill_2d_inplace[" float64_t" ]
760- backfill_2d_inplace_float32 = backfill_2d_inplace[" float32_t" ]
761- backfill_2d_inplace_object = backfill_2d_inplace[" object" ]
762- backfill_2d_inplace_int64 = backfill_2d_inplace[" int64_t" ]
763- backfill_2d_inplace_int32 = backfill_2d_inplace[" int32_t" ]
764- backfill_2d_inplace_uint64 = backfill_2d_inplace[" uint64_t" ]
765- backfill_2d_inplace_bool = backfill_2d_inplace[" uint8_t" ]
766-
767-
768679@ cython.wraparound (False )
769680@ cython.boundscheck (False )
770681def arrmap (ndarray[algos_t] index , object func ):
@@ -875,20 +786,6 @@ def is_monotonic(ndarray[algos_t, ndim=1] arr, bint timelike):
875786 return is_monotonic_inc, is_monotonic_dec, is_strict_monotonic
876787
877788
878- is_monotonic_float64 = is_monotonic[" float64_t" ]
879- is_monotonic_float32 = is_monotonic[" float32_t" ]
880- is_monotonic_object = is_monotonic[" object" ]
881- is_monotonic_int64 = is_monotonic[" int64_t" ]
882- is_monotonic_int32 = is_monotonic[" int32_t" ]
883- is_monotonic_int16 = is_monotonic[" int16_t" ]
884- is_monotonic_int8 = is_monotonic[" int8_t" ]
885- is_monotonic_uint64 = is_monotonic[" uint64_t" ]
886- is_monotonic_uint32 = is_monotonic[" uint32_t" ]
887- is_monotonic_uint16 = is_monotonic[" uint16_t" ]
888- is_monotonic_uint8 = is_monotonic[" uint8_t" ]
889- is_monotonic_bool = is_monotonic[" uint8_t" ]
890-
891-
892789# generated from template
893790include " algos_common_helper.pxi"
894791include " algos_rank_helper.pxi"
0 commit comments