diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-07-21 12:41:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-21 11:41:08 +0100 |
commit | 410654525f36e95aebb52462c3ec9bb25826523c (patch) | |
tree | abaab4f031a70777ddda24d125160c7b6099d809 /candle-core/src/error.rs | |
parent | c60831aad4f266a320f9854f4ebb3d2d4ab8bc66 (diff) | |
download | candle-410654525f36e95aebb52462c3ec9bb25826523c.tar.gz candle-410654525f36e95aebb52462c3ec9bb25826523c.tar.bz2 candle-410654525f36e95aebb52462c3ec9bb25826523c.zip |
Refactor the reduce ops in order to introduce argmin/argmax. (#212)
* Refactor the reduce ops in order to introduce argmin/argmax.
* Clippy fixes.
* Use the newly introduced argmax.
* Fix the strided case.
* Handle the non-contiguous case.
Diffstat (limited to 'candle-core/src/error.rs')
-rw-r--r-- | candle-core/src/error.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/candle-core/src/error.rs b/candle-core/src/error.rs index acbe28d3..23f2642d 100644 --- a/candle-core/src/error.rs +++ b/candle-core/src/error.rs @@ -79,6 +79,9 @@ pub enum Error { nth_shape: Shape, }, + #[error("{op} can only be performed on a single dimension")] + OnlySingleDimension { op: &'static str, dims: Vec<usize> }, + #[error("empty tensor for {op}")] EmptyTensor { op: &'static str }, |