diff options
author | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-08-01 14:59:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-01 14:59:34 +0200 |
commit | 836ba3e090789dc14d4dda68dacf98937c0ff970 (patch) | |
tree | cd114f7bbb4966a19d7d2f50c5ef86ea8d2d795f /candle-core/src | |
parent | 75e0448114842e5249a5101845ad59de7982bd2a (diff) | |
parent | 091e7819779ec7b011891755ae88d0ce14ff3071 (diff) | |
download | candle-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.rs | 6 |
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]) |