pub enum DType {
F32,
F64,
I32,
}
Expand description
DType of tensor
Variants§
Implementations§
Source§impl DType
impl DType
Sourcepub fn is_floating(self) -> bool
pub fn is_floating(self) -> bool
Check if self is floating point dtype
Sourcepub fn zero_value_str(self) -> &'static str
pub fn zero_value_str(self) -> &'static str
Zero value as string
Sourcepub fn min_value_str(self) -> &'static str
pub fn min_value_str(self) -> &'static str
Min value as string
Trait Implementations§
Source§impl Ord for DType
impl Ord for DType
Source§impl PartialOrd for DType
impl PartialOrd for DType
impl Copy for DType
impl Eq for DType
impl StructuralPartialEq for DType
Auto Trait Implementations§
impl Freeze for DType
impl RefUnwindSafe for DType
impl Send for DType
impl Sync for DType
impl Unpin for DType
impl UnwindSafe for DType
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more