diff options
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]) |