pub struct PyArrayLike<'py, T, D>(/* private fields */)
where
T: Element,
D: Dimension;
Expand description
To be used for extracting an array from any Python object which can be regarded as an array of type T
and dimension D
in a reasonable way.
Implementations§
Source§impl<'py, T, D> PyArrayLike<'py, T, D>
impl<'py, T, D> PyArrayLike<'py, T, D>
Sourcepub fn into_owned_array(self) -> Array<T, D>
pub fn into_owned_array(self) -> Array<T, D>
Consumes self
and moves its data into an owned array.
Sourcepub fn into_pyarray(self) -> PyReadonlyArray<'py, T, D>
pub fn into_pyarray(self) -> PyReadonlyArray<'py, T, D>
Consumes self
and moves its data into a numpy array.
Trait Implementations§
Source§impl<'py, T, D> Debug for PyArrayLike<'py, T, D>
impl<'py, T, D> Debug for PyArrayLike<'py, T, D>
Source§impl<T, D> From<PyArrayLike<'_, T, D>> for Array<T, D>
impl<T, D> From<PyArrayLike<'_, T, D>> for Array<T, D>
Source§fn from(value: PyArrayLike<'_, T, D>) -> Self
fn from(value: PyArrayLike<'_, T, D>) -> Self
Converts to this type from the input type.
Source§impl<'py, T, D> From<PyArrayLike<'py, T, D>> for PyReadonlyArray<'py, T, D>
impl<'py, T, D> From<PyArrayLike<'py, T, D>> for PyReadonlyArray<'py, T, D>
Source§fn from(value: PyArrayLike<'py, T, D>) -> Self
fn from(value: PyArrayLike<'py, T, D>) -> Self
Converts to this type from the input type.
Source§impl<'py, T, D> FromPyObject<'py> for PyArrayLike<'py, T, D>
impl<'py, T, D> FromPyObject<'py> for PyArrayLike<'py, T, D>
Auto Trait Implementations§
impl<'py, T, D> Freeze for PyArrayLike<'py, T, D>where
D: Freeze,
impl<'py, T, D> !RefUnwindSafe for PyArrayLike<'py, T, D>
impl<'py, T, D> !Send for PyArrayLike<'py, T, D>
impl<'py, T, D> !Sync for PyArrayLike<'py, T, D>
impl<'py, T, D> Unpin for PyArrayLike<'py, T, D>
impl<'py, T, D> UnwindSafe for PyArrayLike<'py, 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