matrix_from_numpy

Function matrix_from_numpy 

Source
pub fn matrix_from_numpy<N, R, C>(
    py: Python<'_>,
    input: &PyAny,
) -> Result<MatrixMN<N, R, C>, Error>
where N: Scalar + Element, R: Dim, C: Dim, DefaultAllocator: Allocator<N, R, C>,
Expand description

Create an owning nalgebra matrix from a numpy array.

The data is copied into the matrix.

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.