Skip to content

nb module

Numba-compiled functions for grouping.


get_group_lens_nb function

get_group_lens_nb(
    groups
)

Return the count per group.

Note

Columns must form monolithic, sorted groups. For unsorted groups, use get_group_map_nb.


get_group_map_nb function

get_group_map_nb(
    groups,
    n_groups
)

Build the map between groups and indices.

Returns an array with indices segmented by group and an array with group lengths.

Works well for unsorted group arrays.


group_by_evenly_nb function

group_by_evenly_nb(
    n,
    n_splits
)

Get group_by from evenly splitting a space of values.


group_lens_select_nb function

group_lens_select_nb(
    group_lens,
    new_groups
)

Perform indexing on a sorted array using group lengths.

Returns indices of elements corresponding to groups in new_groups and a new group array.


group_map_select_nb function

group_map_select_nb(
    group_map,
    new_groups
)

Perform indexing using group map.