mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Use broadcasted scalars for const tensors.
This commit is contained in:
@ -3,6 +3,8 @@ use crate::{Error, Result};
|
||||
#[derive(Clone, PartialEq, Eq)]
|
||||
pub struct Shape(Vec<usize>);
|
||||
|
||||
pub const SCALAR: Shape = Shape(vec![]);
|
||||
|
||||
impl std::fmt::Debug for Shape {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{:?}", &self.dims())
|
||||
|
Reference in New Issue
Block a user