Struct metatensor::EmptyArray
source · pub struct EmptyArray { /* private fields */ }
Expand description
An implementation of the Array
trait without any data.
This only tracks the shape of the array.
Implementations§
source§impl EmptyArray
impl EmptyArray
sourcepub fn new(shape: Vec<usize>) -> EmptyArray
pub fn new(shape: Vec<usize>) -> EmptyArray
Create a new EmptyArray
with the given shape.
Trait Implementations§
source§impl Array for EmptyArray
impl Array for EmptyArray
source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Get the array as a mutable
Any
referencesource§fn data(&mut self) -> &mut [f64]
fn data(&mut self) -> &mut [f64]
Get the underlying data storage as a contiguous slice Read more
source§fn create(&self, shape: &[usize]) -> Box<dyn Array>
fn create(&self, shape: &[usize]) -> Box<dyn Array>
Create a new array with the same options as the current one (data type,
data location, etc.) and the requested
shape
. Read moresource§fn swap_axes(&mut self, axis_1: usize, axis_2: usize)
fn swap_axes(&mut self, axis_1: usize, axis_2: usize)
Swap the axes
axis_1
and axis_2
in this arraysource§fn move_samples_from(
&mut self,
_: &dyn Array,
_: &[mts_sample_mapping_t],
_: Range<usize>
)
fn move_samples_from( &mut self, _: &dyn Array, _: &[mts_sample_mapping_t], _: Range<usize> )
source§impl Clone for EmptyArray
impl Clone for EmptyArray
source§fn clone(&self) -> EmptyArray
fn clone(&self) -> EmptyArray
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 moreAuto Trait Implementations§
impl RefUnwindSafe for EmptyArray
impl Send for EmptyArray
impl Sync for EmptyArray
impl Unpin for EmptyArray
impl UnwindSafe for EmptyArray
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