[][src]Function nalgebra_numpy::matrix_from_python

pub fn matrix_from_python<N, R, C>(
    input: &PyAny
) -> Result<MatrixMN<N, R, C>, Error> where
    N: Scalar + TypeNum,
    R: Dim,
    C: Dim,
    DefaultAllocator: Allocator<N, R, C>, 

Create a nalgebra::Matrix from a Python numpy.ndarray.

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.