[−][src]Struct arrow::tensor::Tensor
Tensor of primitive types
Methods
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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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<T> FromCast for T
[src]
impl<T, U> Cast for T where
U: FromCast<T>,
[src]
U: FromCast<T>,