Add the varbuilder + check shapes.

This commit is contained in:
laurent
2023-07-03 15:32:20 +01:00
parent 895805be92
commit ad52b0377c
2 changed files with 163 additions and 62 deletions

View File

@ -10,6 +10,13 @@ pub enum Error {
got: DType,
},
#[error("{msg}, expected: {expected:?}, got: {got:?}")]
UnexpectedShape {
msg: String,
expected: Shape,
got: Shape,
},
#[error("{op}: dimension index {dim} out of range for {shape:?}")]
DimOutOfRange {
shape: Shape,