pub struct VariableShapeTensorMetadata {
dim_names: Option<Vec<String>>,
permutations: Option<Vec<usize>>,
uniform_shape: Option<Vec<Option<i32>>>,
}Expand description
Extension type metadata for VariableShapeTensor.
Fields§
§dim_names: Option<Vec<String>>Explicit names to tensor dimensions.
permutations: Option<Vec<usize>>Indices of the desired ordering of the original dimensions.
uniform_shape: Option<Vec<Option<i32>>>Sizes of individual tensor’s dimensions which are guaranteed to stay constant in uniform dimensions and can vary in non-uniform dimensions.
Implementations§
Source§impl VariableShapeTensorMetadata
impl VariableShapeTensorMetadata
Sourcepub fn try_new(
dimensions: usize,
dimension_names: Option<Vec<String>>,
permutations: Option<Vec<usize>>,
uniform_shapes: Option<Vec<Option<i32>>>,
) -> Result<Self, ArrowError>
pub fn try_new( dimensions: usize, dimension_names: Option<Vec<String>>, permutations: Option<Vec<usize>>, uniform_shapes: Option<Vec<Option<i32>>>, ) -> Result<Self, ArrowError>
Returns metadata for a variable shape tensor extension type.
§Error
Return an error if the provided dimension names, permutations or uniform shapes are invalid.
fn validate(&self, dimensions: usize) -> Result<(), ArrowError>
Sourcepub fn dimension_names(&self) -> Option<&[String]>
pub fn dimension_names(&self) -> Option<&[String]>
Returns the names of the dimensions in this variable shape tensor, if set.
Sourcepub fn permutations(&self) -> Option<&[usize]>
pub fn permutations(&self) -> Option<&[usize]>
Returns the indices of the desired ordering of the original dimensions, if set.
Sourcepub fn uniform_shapes(&self) -> Option<&[Option<i32>]>
pub fn uniform_shapes(&self) -> Option<&[Option<i32>]>
Returns sizes of individual tensor’s dimensions which are guaranteed to stay constant in uniform dimensions and can vary in non-uniform dimensions.
Trait Implementations§
Source§impl Clone for VariableShapeTensorMetadata
impl Clone for VariableShapeTensorMetadata
Source§impl Debug for VariableShapeTensorMetadata
impl Debug for VariableShapeTensorMetadata
Source§impl<'de> Deserialize<'de> for VariableShapeTensorMetadata
impl<'de> Deserialize<'de> for VariableShapeTensorMetadata
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for VariableShapeTensorMetadata
Auto Trait Implementations§
impl Forget for VariableShapeTensorMetadata
impl Freeze for VariableShapeTensorMetadatawhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Option<i32>>: Freeze,
impl Move for VariableShapeTensorMetadata
impl RefUnwindSafe for VariableShapeTensorMetadata
impl Send for VariableShapeTensorMetadatawhere
RawVecInner: Send,
impl Sync for VariableShapeTensorMetadatawhere
RawVecInner: Sync,
impl Unpin for VariableShapeTensorMetadata
impl UnsafeUnpin for VariableShapeTensorMetadatawhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Option<i32>>: UnsafeUnpin,
impl UnwindSafe for VariableShapeTensorMetadatawhere
RawVecInner: UnwindSafe,
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