mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 11:08:52 +00:00
Improve how we check that the dims are in bounds.
This commit is contained in:
@ -10,6 +10,13 @@ pub enum Error {
|
||||
got: DType,
|
||||
},
|
||||
|
||||
#[error("{op}: dimension index {dim} out of range for {shape:?}")]
|
||||
DimOutOfRange {
|
||||
shape: Shape,
|
||||
dim: usize,
|
||||
op: &'static str,
|
||||
},
|
||||
|
||||
#[error("invalid args for narrow: {shape:?}, dim: {dim}, start: {start}, len:{len}")]
|
||||
NarrowInvalidArgs {
|
||||
shape: Shape,
|
||||
|
Reference in New Issue
Block a user