Fixing slice errors + comments.

This commit is contained in:
Nicolas Patry
2023-07-27 16:59:32 +02:00
parent 25a2086e8f
commit 952eca6b54
2 changed files with 29 additions and 3 deletions

View File

@ -79,6 +79,13 @@ pub enum Error {
nth_shape: Shape,
},
#[error("Cannot divide tensor of shape {shape:?} equally along dim {dim} into {n_parts}")]
ShapeMismatchSplit {
shape: Shape,
dim: usize,
n_parts: usize,
},
#[error("{op} can only be performed on a single dimension")]
OnlySingleDimension { op: &'static str, dims: Vec<usize> },