Skip to main content

normalize_axis

Function normalize_axis 

Source
pub fn normalize_axis(axis: i64, ndim: usize) -> i64
Expand description

Normalize a potentially negative axis to a positive axis.

For example, normalize_axis(-1, 4) returns 3.