
Dear all,
-----Original Message----- From: numpy-discussion-bounces@scipy.org [mailto:numpy-discussion- bounces@scipy.org] On Behalf Of Sebastian Berg Sent: Tuesday, March 31, 2015 9:37 AM To: numpy-discussion@scipy.org Subject: Re: [Numpy-discussion] How to Force Storage Order
Frankly, I would suggest to call some function like that in any case (or at least assert the memory order or have a test suit), just to make sure that if some implementation detail changes you are not relying on "this function will give me back a fortran ordered array". Of course you can do tricks to make this extra function call a no-op, since it will do nothing if the array is already in the correct memory order. But the quick check that everything is in order should not matter speed wise. To be honest, after doing an SVD, even the copy likely doesn't matter speed wise....
After Ian response I have decided to go for properly invoking dgemm with the right transpose parameters if the data is in transposed format. That's way more generic and works even if Numpy decided to switch again from C to F order or vice versa. All I assume now is that a temporary matrix is C order, but that I can control when constructing the matrix. Thanks for helping on this one! Kind regards, -michael Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052