[−][src]Struct arrow::tensor::Tensor
Tensor of primitive types
Implementations
impl<'a, T: ArrowPrimitiveType> Tensor<'a, T>
[src]
pub fn new(
buffer: Buffer,
shape: Option<Vec<usize>>,
strides: Option<Vec<usize>>,
names: Option<Vec<&'a str>>
) -> Self
[src]
buffer: Buffer,
shape: Option<Vec<usize>>,
strides: Option<Vec<usize>>,
names: Option<Vec<&'a str>>
) -> Self
Creates a new Tensor
pub fn new_row_major(
buffer: Buffer,
shape: Option<Vec<usize>>,
names: Option<Vec<&'a str>>
) -> Self
[src]
buffer: Buffer,
shape: Option<Vec<usize>>,
names: Option<Vec<&'a str>>
) -> Self
Creates a new Tensor using row major memory layout
pub fn new_column_major(
buffer: Buffer,
shape: Option<Vec<usize>>,
names: Option<Vec<&'a str>>
) -> Self
[src]
buffer: Buffer,
shape: Option<Vec<usize>>,
names: Option<Vec<&'a str>>
) -> Self
Creates a new Tensor using column major memory layout
pub fn data_type(&self) -> &DataType
[src]
The data type of the Tensor
pub fn shape(&self) -> Option<&Vec<usize>>
[src]
The sizes of the dimensions
pub fn data(&self) -> &Buffer
[src]
Returns a reference to the underlying Buffer
pub fn strides(&self) -> Option<&Vec<usize>>
[src]
The number of bytes between elements in each dimension
pub fn names(&self) -> Option<&Vec<&'a str>>
[src]
The names of the dimensions
pub fn ndim(&self) -> usize
[src]
The number of dimensions
pub fn dim_name(&self, i: usize) -> Option<&'a str>
[src]
The name of dimension i
pub fn size(&self) -> usize
[src]
The total number of elements in the Tensor
pub fn is_contiguous(&self) -> bool
[src]
Indicates if the data is laid out contiguously in memory
pub fn is_row_major(&self) -> bool
[src]
Indicates if the memory layout row major
pub fn is_column_major(&self) -> bool
[src]
Indicates if the memory layout column major
Trait Implementations
impl<'a, T: Debug + ArrowPrimitiveType> Debug for Tensor<'a, T>
[src]
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Tensor<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for Tensor<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for Tensor<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for Tensor<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> UnwindSafe for Tensor<'a, T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,