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
Add transpose function #939
Conversation
Fixed 018c0a1 |
Possibly. Do you have access to an Intel or PGI compiler? At least one of them should raise an error... |
Hmm, it seems the tests are passing as there is no transpose required in most cases, it just changes the order of the resulting array. And in the case of an expression the transpose is often unrolled anyway. I have added a test case to force the use of the transpose function and it seems that the transpose is not correctly managed |
Thanks for looking into this, that makes a lot of sense! I am afraid that this PR will need a bit more work then, so it may be worth checking a couple of other things:
|
No, I will add this
No, I wanted to add this, but in python I believe it is possible to do this without necessarily allocating memory. This is not possible in Fortran unless we change all our element-wise access methods to carry |
I thought that even in Numpy a new array was created in all cases where it is not sufficient to change the ordering... I am going to check this. |
No, as long as it can be handled by modifying the
|
You're right. Upon calling |
For now I suggest to add the |
Done. Should I open an issue for the |
@EmilyBourne I think the PR description should be expanded a bit (the method |
Implement the
transpose
function. In fortran when used as a temporary variable thetranspose
function is used. When the variable is saved, the ordering is used to ensure pointers are created. In C the function is handled through unravelling or with a new functiontranspose_alias_assign
.The
transpose
function is also used to implement the ndarray property.T
and method.transpose()
Related to #806 and #458