[][src]Struct arrow::tensor::Tensor

pub struct Tensor<'a, T: ArrowPrimitiveType> { /* fields omitted */ }

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]

Creates a new Tensor

pub fn new_row_major(
    buffer: Buffer,
    shape: Option<Vec<usize>>,
    names: Option<Vec<&'a str>>
) -> Self
[src]

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]

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

impl<'a, T> Send for Tensor<'a, T> where
    T: Send

impl<'a, T> Sync for Tensor<'a, T> where
    T: Sync

impl<'a, T> Unpin for Tensor<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for Tensor<'a, T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,