-
Notifications
You must be signed in to change notification settings - Fork 120
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
Support nalgebra transposed conversion #424
Comments
Can't you apply |
Alternatively, if |
Thanks for the quick reply - I've been playing around with some options, but I can't figure out how to get either of these to work. The function is written to take in a |
Do you think exposing a safe interface to NumPy's |
Yes, I think that would work! Either that or |
I went for permute/transpose as the more general transformation. Could you give the code in #428 a try to see whether it resolves your issue? |
Hi! Love working with this library and its integration with
nalgebra
. However, I was wondering whether it would be possible to support an additional set of conversions to/fromnalgebra
which essentially act as "transpose" conversions. The current.as_matrix
works great if you want to keep thinking of the array in Python and Rust as the same shape and convention; however, I would really like to write a library that expects the matrix convention to be different between the Python and the Rust code.As a concrete example, the following 2x3 matrix in Python/NumPy with C-style ordering
is the exact same memory layout as the following 3x2 matrix in
nalgebra
with F-style orderinghowever, the current code cannot produce this conversion without an additional
nalgebra
transpose and data copy, as far as I can tell. I'd be happy to put in a PR for adding this behavior! Would like to hear peoples' thoughts, thanks.The text was updated successfully, but these errors were encountered: