[][src]Function ndarray::concatenate

pub fn concatenate<A, D>(
    axis: Axis,
    arrays: &[ArrayView<'_, A, D>]
) -> Result<Array<A, D>, ShapeError> where
    A: Copy,
    D: RemoveAxis

Concatenate arrays along the given axis.

Errors if the arrays have mismatching shapes, apart from along axis. (may be made more flexible in the future).
Errors if arrays is empty, if axis is out of bounds, if the result is larger than is possible to represent.

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

let a = arr2(&[[2., 2.],
               [3., 3.]]);
    concatenate(Axis(0), &[a.view(), a.view()])
    == Ok(arr2(&[[2., 2.],
                 [3., 3.],
                 [2., 2.],
                 [3., 3.]]))