utilities#

array_sparsity

Calculate the sparsity (percentage of zeros) of an array-like.

check_pipeline

Validate a pipeline setup.

feature_name_mapper

Map a vector of feature names feature_names against the full set of feature names provided by feature_names_in.

get_module_name

Retrieve the name of the calling module.

inf_mask

Return a boolean numpy array or vector indicating the locations of infinity-like values in the data.

nan_mask

This function combines pybear nan_mask_numerical() and nan_mask_string(), giving a centralized location for masking numerical and non-numerical data.

nan_mask_numerical

Return a boolean numpy array or vector indicating the locations of nan-like representations in the data.

nan_mask_string

In all cases, return an identically shaped boolean numpy array or vector indicating the locations of nan-like representations in the data.

permuter

Find all possible unique combinations in drawing a single value from each group in a collection of groups of unique values.

print_inspect_stack

Print a module's stack hierarchy to screen.

serial_index_mapper

Map serial index positions to their zero-based Cartesian coordinates in an object of the given shape.

time_memory_benchmark

Measure the average time (seconds) and the average change in system RAM (MB) when computing functions.

timer

Wraps a function with a timer that displays the time in seconds it took for the function to run.

union_find

Use the union-find algorithm to find groups of connected values from disjoint pairs of connected values.