Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Tensor in datafusion::common::arrow::tensor - Rust
[go: Go Back, main page]

pub struct Tensor<'a, T>where
    T: ArrowPrimitiveType,{ /* private fields */ }
Expand description

Tensor of primitive types

Implementations§

source§

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

source

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

Creates a new Tensor

source

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

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<Tensor<'a, T>, ArrowError>

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, ArrowError>

Indicates if the data is laid out contiguously in memory

source

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

Indicates if the memory layout row major

source

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

Indicates if the memory layout column major

Trait Implementations§

source§

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

source§

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

Formats the value using the given formatter. Read more

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> Allocation for Twhere T: RefUnwindSafe + Send + Sync,