Skip to main content

map2

Function map2 

Source
pub fn map2<A: Copy, B: Copy, U>(
    shape: &[usize],
    a: View<'_, A>,
    b: View<'_, B>,
    out: &mut [U],
    f: impl Fn(A, B) -> U,
)
Expand description

Applies f element-wise: out[i] = f(a[i], b[i]) in row-major order of shape.

ยงPanics

As map1.