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§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 Freeze for EmptyArray
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