arrow::tensor

Type Alias DurationSecondTensor

Source
pub type DurationSecondTensor<'a> = Tensor<'a, DurationSecondType>;
Expand description

Aliased Type§

struct DurationSecondTensor<'a> { /* private fields */ }

Implementations

Source§

impl<'a, T: ArrowPrimitiveType> Tensor<'a, T>

Source

pub fn try_new( buffer: Buffer, shape: Option<Vec<usize>>, strides: Option<Vec<usize>>, names: Option<Vec<&'a str>>, ) -> Result<Self>

Creates a new Tensor

Source

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

Creates a new Tensor using row major memory layout

Source

pub fn new_column_major( buffer: Buffer, shape: Option<Vec<usize>>, names: Option<Vec<&'a str>>, ) -> Result<Self>

Creates a new Tensor using column major memory layout

Source

pub fn data_type(&self) -> &DataType

The data type of the Tensor

Source

pub fn shape(&self) -> Option<&Vec<usize>>

The sizes of the dimensions

Source

pub fn data(&self) -> &Buffer

Returns a reference to the underlying Buffer

Source

pub fn strides(&self) -> Option<&Vec<usize>>

The number of bytes between elements in each dimension

Source

pub fn names(&self) -> Option<&Vec<&'a str>>

The names of the dimensions

Source

pub fn ndim(&self) -> usize

The number of dimensions

Source

pub fn dim_name(&self, i: usize) -> Option<&'a str>

The name of dimension i

Source

pub fn size(&self) -> usize

The total number of elements in the Tensor

Source

pub fn is_contiguous(&self) -> Result<bool>

Indicates if the data is laid out contiguously in memory

Source

pub fn is_row_major(&self) -> Result<bool>

Indicates if the memory layout row major

Source

pub fn is_column_major(&self) -> Result<bool>

Indicates if the memory layout column major

Trait Implementations

Source§

impl<'a, T: Debug + ArrowPrimitiveType> Debug for Tensor<'a, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more