pub struct Tensor { /* private fields */ }Expand description
A tensor holding raw bytes with data type and shape metadata.
This represents a multidimensional array of fixed-size elements in C-contiguous (row-major) order.
Implementations§
Trait Implementations§
Source§impl FromArrayBytes for Tensor
impl FromArrayBytes for Tensor
Source§fn from_array_bytes(
bytes: ArrayBytes<'static>,
shape: &[u64],
data_type: &DataType,
) -> Result<Self, ArrayError>
fn from_array_bytes( bytes: ArrayBytes<'static>, shape: &[u64], data_type: &DataType, ) -> Result<Self, ArrayError>
Source§fn from_array_bytes_arc(
bytes: Arc<ArrayBytes<'static>>,
shape: &[u64],
data_type: &DataType,
) -> Result<Self, ArrayError>
fn from_array_bytes_arc( bytes: Arc<ArrayBytes<'static>>, shape: &[u64], data_type: &DataType, ) -> Result<Self, ArrayError>
Source§impl<'a> IntoArrayBytes<'a> for &'a Tensor
impl<'a> IntoArrayBytes<'a> for &'a Tensor
Source§fn into_array_bytes(
self,
data_type: &DataType,
) -> Result<ArrayBytes<'a>, ElementError>
fn into_array_bytes( self, data_type: &DataType, ) -> Result<ArrayBytes<'a>, ElementError>
Source§impl IntoArrayBytes<'static> for Tensor
impl IntoArrayBytes<'static> for Tensor
Source§fn into_array_bytes(
self,
data_type: &DataType,
) -> Result<ArrayBytes<'static>, ElementError>
fn into_array_bytes( self, data_type: &DataType, ) -> Result<ArrayBytes<'static>, ElementError>
Source§impl TensorLike<RowMajorCompactLayout> for Tensor
Available on crate feature dlpack only.
impl TensorLike<RowMajorCompactLayout> for Tensor
Available on crate feature
dlpack only.Auto Trait Implementations§
impl Freeze for Tensor
impl Send for Tensor
impl Sync for Tensor
impl !RefUnwindSafe for Tensor
impl Unpin for Tensor
impl UnsafeUnpin for Tensor
impl !UnwindSafe for Tensor
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> 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