pub struct NdarrayWrapper<T, D: Dimension> { /* private fields */ }
Expand description
A wrapper for ndarray to implement the ArrayProtocol trait.
Implementations§
Source§impl<T, D> NdarrayWrapper<T, D>
impl<T, D> NdarrayWrapper<T, D>
Sourcepub fn into_array(self) -> Array<T, D>
pub fn into_array(self) -> Array<T, D>
Convert into the underlying ndarray.
Sourcepub fn update_array(&mut self, new_array: Array<T, D>)
pub fn update_array(&mut self, new_array: Array<T, D>)
Update the underlying array with a new one.
Trait Implementations§
Source§impl<T, D> ArrayProtocol for NdarrayWrapper<T, D>
impl<T, D> ArrayProtocol for NdarrayWrapper<T, D>
Source§fn array_function(
&self,
func: &ArrayFunction,
_types: &[TypeId],
args: &[Box<dyn Any>],
kwargs: &HashMap<String, Box<dyn Any>>,
) -> Result<Box<dyn Any>, NotImplemented>
fn array_function( &self, func: &ArrayFunction, _types: &[TypeId], args: &[Box<dyn Any>], kwargs: &HashMap<String, Box<dyn Any>>, ) -> Result<Box<dyn Any>, NotImplemented>
Implementation of the array protocol. Read more
Source§fn shape(&self) -> &[usize]
fn shape(&self) -> &[usize]
Get the shape of the array (default implementation returns empty slice)
Source§fn box_clone(&self) -> Box<dyn ArrayProtocol>
fn box_clone(&self) -> Box<dyn ArrayProtocol>
Clone this array protocol object.
Auto Trait Implementations§
impl<T, D> Freeze for NdarrayWrapper<T, D>where
D: Freeze,
impl<T, D> RefUnwindSafe for NdarrayWrapper<T, D>where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for NdarrayWrapper<T, D>where
T: Send,
impl<T, D> Sync for NdarrayWrapper<T, D>where
T: Sync,
impl<T, D> Unpin for NdarrayWrapper<T, D>
impl<T, D> UnwindSafe for NdarrayWrapper<T, D>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more