modal_filter_ignore_zeros#
- brainglobe_atlasapi.atlas_generation.annotation_utils.modal_filter_ignore_zeros(window)[source]#
Compute the mode of the window, ignoring zero values.
- Parameters:
window (numpy.ndarray) – The input window of values.
- Returns:
The most common non-zero value in the window, or 0 if all values are zero.
- Return type:
int or float