Module core

Module core 

Source
Expand description

Core array utilities and validation functions

Functionsยง

array_concatenate
Concatenate arrays
array_resize
Resize array to new size, padding with zeros if needed
array_reverse
Reverse array
array_split
Split array into chunks
array_unique_counts
Count unique elements
check_array_1d
Check that a 1D array is not empty
check_array_2d
Check that a 2D array is not empty
column_or_1d
Convert 2D array to 1D if possible, otherwise return error
label_counts
Count occurrences of each label
normalize_array
Normalize array to unit norm (L2)
safe_indexing
Safe indexing for 1D arrays
safe_indexing_2d
Safe indexing for 2D arrays
unique_labels
Get unique labels in sorted order