You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like nalgebra's compile-time guarantees about size (just for clean coding purposes), so it would be convenient to have a single-method conversion between them, rather than having extra steps to convert from the dynamic form.
When I searched, I found this page suggesting ways to do it; presumably it would be cleanest if the method fails anytime the size doesn't match exactly, rather than silently truncating, as I think fixed_slice and fixed_rows by themselves do. (Unfortunately I haven't had the chance to try it out yet, as I'm currently bogged down in unrelated version-compatibility issues.)
The text was updated successfully, but these errors were encountered:
Sorry for the late response (a year and a half later 😅), but I believe the easiest way to do this right now would be to simply convert to a DMatrix and then go from the DMatrix to your constant sized matrix using fixed_view. This would allow you to get a fixed view of the DMatrix after conversion.
Of course, we should also be able to do this in nshare. I will leave this ticket open until we have this implemented. I do think we can add TryAsNalgebra, TryAsNalgebraMut, and TryIntoNalgebra to implement this. Note that the trait names are changing in the latest release. See #17.
Feature request is pretty self-explanatory.
I like nalgebra's compile-time guarantees about size (just for clean coding purposes), so it would be convenient to have a single-method conversion between them, rather than having extra steps to convert from the dynamic form.
When I searched, I found this page suggesting ways to do it; presumably it would be cleanest if the method fails anytime the size doesn't match exactly, rather than silently truncating, as I think
fixed_slice
andfixed_rows
by themselves do. (Unfortunately I haven't had the chance to try it out yet, as I'm currently bogged down in unrelated version-compatibility issues.)The text was updated successfully, but these errors were encountered: