pub struct Ndarray {
pub source: Source,
pub shape: Vec<Option<u64>>,
pub datatype: Datatype,
pub byteorder: ByteOrder,
pub offset: u64,
pub strides: Option<Vec<i64>>,
pub mask: Option<Mask>,
}Expand description
A parsed core/ndarray.
Fields§
§source: SourceWhere the data lives.
shape: Vec<Option<u64>>The array’s shape. A leading None means the dimension is determined
from the block’s size, which the schema allows for streamed arrays.
datatype: DatatypeThe element type.
byteorder: ByteOrderByte order of the elements.
offset: u64Offset in bytes into the block where the data starts.
strides: Option<Vec<i64>>Bytes to step per dimension. Absent means C-contiguous.
mask: Option<Mask>How missing values are marked, if at all.
Implementations§
Source§impl Ndarray
impl Ndarray
Sourcepub fn resolved_shape(&self, block_bytes: Option<u64>) -> Result<Vec<u64>>
pub fn resolved_shape(&self, block_bytes: Option<u64>) -> Result<Vec<u64>>
The shape with every dimension known, given the block’s byte length.
A streamed array’s first dimension is * in the file and is derived
from how many whole rows the block holds.
Sourcepub fn len(&self, block_bytes: Option<u64>) -> Result<u64>
pub fn len(&self, block_bytes: Option<u64>) -> Result<u64>
The number of elements, for a fully-known shape.
Sourcepub fn is_empty(&self, block_bytes: Option<u64>) -> Result<bool>
pub fn is_empty(&self, block_bytes: Option<u64>) -> Result<bool>
Whether the array has no elements.
Trait Implementations§
impl StructuralPartialEq for Ndarray
Auto Trait Implementations§
impl Freeze for Ndarray
impl RefUnwindSafe for Ndarray
impl Send for Ndarray
impl Sync for Ndarray
impl Unpin for Ndarray
impl UnsafeUnpin for Ndarray
impl UnwindSafe for Ndarray
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