[−][src]Function nalgebra_numpy::matrix_slice_mut_from_python
pub unsafe fn matrix_slice_mut_from_python<'a, N, R, C>(
input: &'a PyAny
) -> Result<MatrixSliceMut<'a, N, R, C, Dynamic, Dynamic>, Error> where
N: Scalar + TypeNum,
R: Dim,
C: Dim,
Create a nalgebra::MatrixSliceMut
from a Python numpy.ndarray
.
The array dtype must match the output type exactly.
If desired, you can convert the array to the desired type in Python
using numpy.ndarray.astype
.
Safety
This function creates a mutable slice that references data owned by Python. The user must ensure that no other Rust references to the same data exist.