Enum tc_tensor::Array [−][src]
pub enum Array {
Bool(ArrayExt<bool>),
C32(ArrayExt<Complex<f32>>),
C64(ArrayExt<Complex<f64>>),
F32(ArrayExt<f32>),
F64(ArrayExt<f64>),
I16(ArrayExt<i16>),
I32(ArrayExt<i32>),
I64(ArrayExt<i64>),
U8(ArrayExt<u8>),
U16(ArrayExt<u16>),
U32(ArrayExt<u32>),
U64(ArrayExt<u64>),
}
Expand description
A generic one-dimensional array which supports all variants of [NumberType
].
Variants
Implementations
Cast the values of this array into an ArrayExt<T>
.
Concatenate two Array
s.
Construct a new array with the given constant value and length.
Cast into an Array
of a different NumberType
.
Copy the contents of this Array
into a new Vec
.
Element-wise logical and, relative to a constant other
.
Element-wise check for infinite values.
Element-wise logical or, relative to a constant other
.
Set the values at the specified coordinates to the corresponding values in other
.
Set the value at the specified coordinate to value
.
Return a slice of this Array
.
Split this Array
into two new instances at the given pivot.
Trait Implementations
Performs the +=
operation. Read more
Performs the +=
operation. Read more
pub fn deserialize<D>(
deserializer: D
) -> Result<Array, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<Array, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the /=
operation. Read more
Performs the /=
operation. Read more
Creates a value from an iterator. Read more
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
Parse this value using the given Decoder
.
Performs the *=
operation. Read more
Performs the *=
operation. Read more
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for Array
impl UnwindSafe for Array
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true
if self
can be cast into the target type T
.
Test if value
can be cast into Self
.
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
Test if self
can be cast into T
.
Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.