pub enum NdArrayTensor {
F64(SharedArray<f64>),
F32(SharedArray<f32>),
I64(SharedArray<i64>),
I32(SharedArray<i32>),
I16(SharedArray<i16>),
I8(SharedArray<i8>),
U64(SharedArray<u64>),
U32(SharedArray<u32>),
U16(SharedArray<u16>),
U8(SharedArray<u8>),
Bool(SharedArray<bool>),
}Expand description
Tensor primitive used by the ndarray backend.
Variants§
F64(SharedArray<f64>)
F32(SharedArray<f32>)
I64(SharedArray<i64>)
I32(SharedArray<i32>)
I16(SharedArray<i16>)
I8(SharedArray<i8>)
U64(SharedArray<u64>)
U32(SharedArray<u32>)
U16(SharedArray<u16>)
U8(SharedArray<u8>)
Bool(SharedArray<bool>)
Implementations§
Source§impl NdArrayTensor
impl NdArrayTensor
Sourcepub fn from_data(data: TensorData) -> NdArrayTensor
pub fn from_data(data: TensorData) -> NdArrayTensor
Create a new ndarray tensor from data.
Trait Implementations§
Source§impl Clone for NdArrayTensor
impl Clone for NdArrayTensor
Source§fn clone(&self) -> NdArrayTensor
fn clone(&self) -> NdArrayTensor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NdArrayTensor
impl Debug for NdArrayTensor
Source§impl From<ArrayBase<OwnedArcRepr<bool>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<bool>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<bool>) -> NdArrayTensor
fn from(value: SharedArray<bool>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<f32>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<f32>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<f32>) -> NdArrayTensor
fn from(value: SharedArray<f32>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<f64>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<f64>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<f64>) -> NdArrayTensor
fn from(value: SharedArray<f64>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<i16>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<i16>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<i16>) -> NdArrayTensor
fn from(value: SharedArray<i16>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<i32>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<i32>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<i32>) -> NdArrayTensor
fn from(value: SharedArray<i32>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<i64>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<i64>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<i64>) -> NdArrayTensor
fn from(value: SharedArray<i64>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<i8>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<i8>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<i8>) -> NdArrayTensor
fn from(value: SharedArray<i8>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<u16>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<u16>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<u16>) -> NdArrayTensor
fn from(value: SharedArray<u16>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<u32>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<u32>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<u32>) -> NdArrayTensor
fn from(value: SharedArray<u32>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<u64>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<u64>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<u64>) -> NdArrayTensor
fn from(value: SharedArray<u64>) -> NdArrayTensor
Converts to this type from the input type.
Source§impl From<ArrayBase<OwnedArcRepr<u8>, Dim<IxDynImpl>>> for NdArrayTensor
impl From<ArrayBase<OwnedArcRepr<u8>, Dim<IxDynImpl>>> for NdArrayTensor
Source§fn from(value: SharedArray<u8>) -> NdArrayTensor
fn from(value: SharedArray<u8>) -> NdArrayTensor
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NdArrayTensor
impl RefUnwindSafe for NdArrayTensor
impl Send for NdArrayTensor
impl Sync for NdArrayTensor
impl Unpin for NdArrayTensor
impl UnwindSafe for NdArrayTensor
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