![]() Registered Member ![]()
|
Is there as "smart" built-in way to flatten a NxM matrix to a N*M vector by concatenating columns/rows, and vice versa?
For example:
For dense contiguous matrices, I could simply use a Map to re-interpret the underlying array, but this is very verbose. Am I missing something? |
![]() Moderator ![]()
|
Nothing better than Map yet. To make it less verbose, you can easily write a small wrapper function for your purpose.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]