-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to transpose? #8
Comments
See the reorder, reorder_mut and into_reordered methods. Are they what you mean? |
Ah, I didn't find this one since I was searching for "Strided" on the documentation page for Yes, this solves this provides transpose, but actually for my own project I need general reordering of dimensions. Technically this is possible with mdarray, right? Is it just a matter of writing a function, or would that need some reorganization of types as well? |
There are functions for general permutations also (permute/permut_mut/into_permuted). Like the view functions they are implemented for fixed rank, so you might have issues with dynamic rank. Maybe the interface for all of these should be updated in some way. Yes, you can also write a standalone function that uses View::new_unchecked with the pointer and a new mapping from StridedMapping::new. For dynamic rank you don't need any reorganization of types. |
Thanks! IMHO the view/permute interface should be either (eventually) updated, or the dynamic rank removed. It feels incomplete in the current state. See #7 for my thoughts. No idea if/how C++ mdarray handles the dynamic rank case. (BTW I hate to use the term rank for number of dimensions, because for me the rank of a matrix is something different. But I see that C++ mdarray uses the same term, and also it's compact.) |
In current mdarray, is it possible to perform a (generalized) transpose operation, i.e. change the order of dimensions without copying the data?
Since a strided layout is supported this should be technically possible.
The text was updated successfully, but these errors were encountered: