summaryrefslogtreecommitdiff
path: root/candle-core/src
diff options
context:
space:
mode:
authorNicolas Patry <patry.nicolas@protonmail.com>2023-08-01 14:59:34 +0200
committerGitHub <noreply@github.com>2023-08-01 14:59:34 +0200
commit836ba3e090789dc14d4dda68dacf98937c0ff970 (patch)
treecd114f7bbb4966a19d7d2f50c5ef86ea8d2d795f /candle-core/src
parent75e0448114842e5249a5101845ad59de7982bd2a (diff)
parent091e7819779ec7b011891755ae88d0ce14ff3071 (diff)
downloadcandle-836ba3e090789dc14d4dda68dacf98937c0ff970.tar.gz
candle-836ba3e090789dc14d4dda68dacf98937c0ff970.tar.bz2
candle-836ba3e090789dc14d4dda68dacf98937c0ff970.zip
Merge pull request #258 from LaurentMazare/start_book
Starting the book.
Diffstat (limited to 'candle-core/src')
-rw-r--r--candle-core/src/shape.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/candle-core/src/shape.rs b/candle-core/src/shape.rs
index b016ead5..a5e21aad 100644
--- a/candle-core/src/shape.rs
+++ b/candle-core/src/shape.rs
@@ -41,6 +41,12 @@ impl From<usize> for Shape {
}
}
+impl From<(usize,)> for Shape {
+ fn from(d1: (usize,)) -> Self {
+ Self(vec![d1.0])
+ }
+}
+
impl From<(usize, usize)> for Shape {
fn from(d12: (usize, usize)) -> Self {
Self(vec![d12.0, d12.1])