Writing fortran ordered binaries from python

I have python code that generates a 256 ^ 3 numpy data array that I would like to read with other fortran code.

This would be relatively easy if the numpy ndarray tofile () function was able to write fortran ordered data, but it wouldn’t and would always write C-ordered data. Is there an equivalent function (in scipy, maybe?) That will do what I want?

+3
source share
1 answer

You can transposearray before writing it.

+8
source

All Articles