Macro ndarray::stack[][src]

macro_rules! stack {
    ($axis:expr, $( $array:expr ),+ ) => { ... };
}

Stack arrays along the given axis.

Uses the stack function, calling ArrayView::from(&a) on each argument a.

Panics if the stack function would return an error.

extern crate ndarray;

use ndarray::{arr2, stack, Axis};


let a = arr2(&[[2., 2.],
               [3., 3.]]);
assert!(
    stack![Axis(0), a, a]
    == arr2(&[[2., 2.],
              [3., 3.],
              [2., 2.],
              [3., 3.]])
);