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.
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§fn clone(&self) -> VariableShapeTensorMetadata
fn clone(&self) -> VariableShapeTensorMetadata
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§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 Freeze for VariableShapeTensorMetadata
impl RefUnwindSafe for VariableShapeTensorMetadata
impl Send for VariableShapeTensorMetadata
impl Sync for VariableShapeTensorMetadata
impl Unpin for VariableShapeTensorMetadata
impl UnwindSafe for VariableShapeTensorMetadata
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