pub fn stack<T: Scalar, B: ComputeBackend + Default>(
tensors: &[&Tensor<T, B>],
dim: usize,
) -> Result<Tensor<T, B>, B::Error>Expand description
Stack tensors along a new dimension dim.
All tensors must have identical shape. dim may be any axis in
0..=tensors[0].ndim().
ยงPanics
tensorsis empty.- Any tensor shape differs from the first tensor.
dimis outside0..=ndim.