Small fix: documentation of Tensor::stack (#1105)

This commit is contained in:
Mykolas Peteraitis 2024-01-08 15:38:27 +02:00 committed by GitHub
parent 3c056a41e3
commit e132e21816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ where
/// # Panics /// # Panics
/// ///
/// If all tensors don't have the same shape. /// If all tensors don't have the same shape.
/// Given dimension is not with range of 0..=D2 /// Given dimension is not with range of 0..D2
pub fn stack<const D2: usize>(tensors: Vec<Tensor<B, D, K>>, dim: usize) -> Tensor<B, D2, K> { pub fn stack<const D2: usize>(tensors: Vec<Tensor<B, D, K>>, dim: usize) -> Tensor<B, D2, K> {
check!(TensorCheck::stack(&tensors, dim)); check!(TensorCheck::stack(&tensors, dim));
let tensors = tensors.into_iter().map(|t| t.unsqueeze_dim(dim)).collect(); let tensors = tensors.into_iter().map(|t| t.unsqueeze_dim(dim)).collect();