Axis iterators can be used as IndexedParallelIterator, but it is not the case for ArrayBase, as shown below:
use rayon::prelude::*;
fn main() {
let a = ndarray::Array1::<u32>::zeros(5);
test_into_par_iter(&a);
test_into_par_iter_indexed(&a); // <- Does not compile.
}
fn test_into_par_iter<T: IntoParallelIterator>(_x: T) {}
fn test_into_par_iter_indexed<T: IntoParallelIterator>(_x: T)
where
T::Iter: IndexedParallelIterator,
{
}
From an outsider perspective, such an implementation appears to be possible. Is it intentionally omitted, or could it be added ?