pub struct Shape(pub Vec<usize>);Expand description
Shape of a tensor (dimensions).
Tuple Fields§
§0: Vec<usize>Implementations§
Source§impl Shape
impl Shape
Sourcepub fn broadcast_compatible(&self, other: &Self) -> bool
pub fn broadcast_compatible(&self, other: &Self) -> bool
Checks if shapes are broadcast compatible.
Sourcepub fn broadcast_shape(&self, other: &Self) -> Option<Self>
pub fn broadcast_shape(&self, other: &Self) -> Option<Self>
Computes broadcast shape.
Trait Implementations§
impl Eq for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.