pub struct FixedShapeTensorMetadata {
shape: Vec<usize>,
dim_names: Option<Vec<String>>,
permutations: Option<Vec<usize>>,
}
Expand description
Extension type metadata for FixedShapeTensor
.
Fields§
§shape: Vec<usize>
The physical shape of the contained tensors.
dim_names: Option<Vec<String>>
Explicit names to tensor dimensions.
permutations: Option<Vec<usize>>
Indices of the desired ordering of the original dimensions.
Implementations§
Source§impl FixedShapeTensorMetadata
impl FixedShapeTensorMetadata
Sourcepub fn try_new(
shape: impl IntoIterator<Item = usize>,
dimension_names: Option<Vec<String>>,
permutations: Option<Vec<usize>>,
) -> Result<Self, ArrowError>
pub fn try_new( shape: impl IntoIterator<Item = usize>, dimension_names: Option<Vec<String>>, permutations: Option<Vec<usize>>, ) -> Result<Self, ArrowError>
Returns metadata for a fixed shape tensor extension type.
§Error
Return an error if the provided dimension names or permutations are invalid.
Sourcepub fn dimensions(&self) -> usize
pub fn dimensions(&self) -> usize
Returns the number of dimensions in this fixed shape tensor.
Sourcepub fn dimension_names(&self) -> Option<&[String]>
pub fn dimension_names(&self) -> Option<&[String]>
Returns the names of the dimensions in this fixed 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.
Trait Implementations§
Source§impl Clone for FixedShapeTensorMetadata
impl Clone for FixedShapeTensorMetadata
Source§fn clone(&self) -> FixedShapeTensorMetadata
fn clone(&self) -> FixedShapeTensorMetadata
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 FixedShapeTensorMetadata
impl Debug for FixedShapeTensorMetadata
Source§impl<'de> Deserialize<'de> for FixedShapeTensorMetadata
impl<'de> Deserialize<'de> for FixedShapeTensorMetadata
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
Source§impl PartialEq for FixedShapeTensorMetadata
impl PartialEq for FixedShapeTensorMetadata
Source§impl Serialize for FixedShapeTensorMetadata
impl Serialize for FixedShapeTensorMetadata
impl StructuralPartialEq for FixedShapeTensorMetadata
Auto Trait Implementations§
impl Freeze for FixedShapeTensorMetadata
impl RefUnwindSafe for FixedShapeTensorMetadata
impl Send for FixedShapeTensorMetadata
impl Sync for FixedShapeTensorMetadata
impl Unpin for FixedShapeTensorMetadata
impl UnwindSafe for FixedShapeTensorMetadata
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