pub struct ArrowTensor {
pub metadata: TensorMetadata,
/* private fields */
}Expand description
Arrow-backed tensor for zero-copy access
Fields§
§metadata: TensorMetadataTensor metadata
Implementations§
Source§impl ArrowTensor
impl ArrowTensor
Sourcepub fn from_slice_f32(name: &str, shape: Vec<usize>, data: &[f32]) -> Self
pub fn from_slice_f32(name: &str, shape: Vec<usize>, data: &[f32]) -> Self
Create a new Arrow tensor from raw data
Sourcepub fn from_slice_f64(name: &str, shape: Vec<usize>, data: &[f64]) -> Self
pub fn from_slice_f64(name: &str, shape: Vec<usize>, data: &[f64]) -> Self
Create a new Arrow tensor from raw f64 data
Sourcepub fn from_slice_i32(name: &str, shape: Vec<usize>, data: &[i32]) -> Self
pub fn from_slice_i32(name: &str, shape: Vec<usize>, data: &[i32]) -> Self
Create from i32 data
Sourcepub fn from_slice_i64(name: &str, shape: Vec<usize>, data: &[i64]) -> Self
pub fn from_slice_i64(name: &str, shape: Vec<usize>, data: &[i64]) -> Self
Create from i64 data
Sourcepub fn as_slice_f32(&self) -> Option<&[f32]>
pub fn as_slice_f32(&self) -> Option<&[f32]>
Get zero-copy view of f32 data
Sourcepub fn as_slice_f64(&self) -> Option<&[f64]>
pub fn as_slice_f64(&self) -> Option<&[f64]>
Get zero-copy view of f64 data
Sourcepub fn as_slice_i32(&self) -> Option<&[i32]>
pub fn as_slice_i32(&self) -> Option<&[i32]>
Get zero-copy view of i32 data
Sourcepub fn as_slice_i64(&self) -> Option<&[i64]>
pub fn as_slice_i64(&self) -> Option<&[i64]>
Get zero-copy view of i64 data
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArrowTensor
impl !RefUnwindSafe for ArrowTensor
impl Send for ArrowTensor
impl Sync for ArrowTensor
impl Unpin for ArrowTensor
impl !UnwindSafe for ArrowTensor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more