dimforge / dimforge/nalgebra

Impossible to use MatrixVec for storage of a statically sized matrix?

Open
#363 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Hello! I'm trying to figure out how to use `nalgebra` and I'm hitting the following issue.

I have a function that parses a list of numbers and returns a `Vec`. I use the function in such a way that the vector is ensured to have a certain size (in this case, 20 elements). I want to create a `Matrix4x5` with the contents of this vector. Using `Matrix4x5::from_row_slice()` would work, but as far as I can tell it will copy the contents of the vector into a stack-based array. What I'd like to do is to use the existing vector storage with something along `Matrix4x5::from_data(MatrixVec::new(U4, U5, my_vector))`, which errors out with "expected `MatrixArray`, found `MatrixVec`".

Is there any way of doing this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.