logo       

Re: Reshaing continued: msg#00023

python.numeric.general

Subject: Re: Reshaing continued

On Sun, 2004-09-05 at 23:26, Karthikesh Raju wrote:

> The transpose was another person's reply to the above question. Actually,
> the reason i was doing all this was because i was working on "a
> dataloader" that allowed me to dump and load variables in a ascii text
> file, similar to what Matlab's mat format does.

I thought as much. This is an issue the, ahem, older folks on this list
have struggled with since we began migrating some of our code from
Fortran to C/C++. Fortran and C arrays are column and row major,
respectively.

I think your best solution is to use a well specified, language
independent format for data storage and use the corresponding utilities
to read and write it. This should solve your problem. For astronomical
images, my community uses FITS, which carefully specifies the order in
which the values are to be written to disk. I also learned at SciPy
that HDF and CDF are becoming more widely used. According to my notes,
PyTables should be able to read and write HDF5 files; see
http://pytables.sourceforge.net. Perhaps this can help.

Stephen Walton <stephen.walton@xxxxxxxx>
Dept. of Physics & Astronomy, CSU Northridge

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise