Skip to main content

flatnonzero

Function flatnonzero 

Source
pub fn flatnonzero<T, D>(a: &Array<T, D>) -> Vec<usize>
where T: Element + PartialEq, D: Dimension,
Expand description

Return the indices of non-zero elements in the flattened array.

Equivalent to np.flatnonzero(a). An element is “non-zero” if it is not equal to the type’s zero value.