summaryrefslogtreecommitdiff
path: root/candle-core/src
diff options
context:
space:
mode:
authorNicolas Patry <patry.nicolas@protonmail.com>2023-07-27 16:59:32 +0200
committerNicolas Patry <patry.nicolas@protonmail.com>2023-07-27 16:59:32 +0200
commit952eca6b540078b1f30b58d9eb930f8e32d903cb (patch)
tree8eb5378393d9c64482638aae5dfeaaabb4ff0248 /candle-core/src
parent25a2086e8f4cc23fada32a44607d3b8550916ebe (diff)
downloadcandle-952eca6b540078b1f30b58d9eb930f8e32d903cb.tar.gz
candle-952eca6b540078b1f30b58d9eb930f8e32d903cb.tar.bz2
candle-952eca6b540078b1f30b58d9eb930f8e32d903cb.zip
Fixing slice errors + comments.
Diffstat (limited to 'candle-core/src')
-rw-r--r--candle-core/src/error.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/candle-core/src/error.rs b/candle-core/src/error.rs
index f9e69122..30d06239 100644
--- a/candle-core/src/error.rs
+++ b/candle-core/src/error.rs
@@ -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> },