From ed8a91d48a9a87bded94099211a3ff38d31517c7 Mon Sep 17 00:00:00 2001 From: Dilshod Tadjibaev <939125+antimora@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:59:02 -0500 Subject: [PATCH] Update slice documentation (#2024) --- crates/burn-tensor/src/tensor/api/base.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/burn-tensor/src/tensor/api/base.rs b/crates/burn-tensor/src/tensor/api/base.rs index 0fd16c151e..70ea7bdacd 100644 --- a/crates/burn-tensor/src/tensor/api/base.rs +++ b/crates/burn-tensor/src/tensor/api/base.rs @@ -589,13 +589,14 @@ where /// # Behavior /// /// - Supports partial and full slicing in any number of dimensions. + /// - Missing ranges are treated as full slices if D > D2. /// - Handles negative indices by wrapping around from the end of the dimension. /// - Clamps ranges to the tensor's dimensions if they exceed the bounds. /// - For `Option<(i64, i64)>` ranges, `None` selects the full range of that dimension. /// /// # Panics /// - /// - If the number of ranges provided doesn't match the tensor's dimensions. + /// - If the number of ranges provided exceeds the tensor's dimensions. /// - If a range is descending (e.g., 2..1) or empty (e.g., 1..1). /// /// # Examples