Skip to content

Commit 9af8e30

Browse files
committed
review
1 parent a81a8ed commit 9af8e30

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/burn-tensor/src/tensor/api/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,8 @@ where
895895
size,
896896
);
897897
assert!(
898-
dim < size,
899-
"Expected: dim < size: found dim={}, size={}",
898+
dim < self.shape().num_dims(),
899+
"Expected: dim < num_dims: found dim={}, num_dims={}",
900900
dim,
901901
size,
902902
);

crates/burn-tensor/src/tensor/indexing/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ where
108108
/// ## Arguments
109109
///
110110
/// * `idx` - The dimension index to canonicalize.
111-
/// * `rank` - The size of the dimension.
111+
/// * `rank` - The number of dimensions.
112112
/// * `wrap_scalar` - If true, pretend scalars have rank=1.
113113
///
114114
/// ## Returns

0 commit comments

Comments
 (0)