Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Ryan May
Nils Wagner wrote: > On Mon, 02 Feb 2009 14:07:35 -0600 > Ryan May wrote: >> Nils Wagner wrote: > Is this a 64-bit problem ? > I don't know if it's a 64-bit problem per-se, so much as a disagreement between fortran and numpy. Numpy is making the size of the integer

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Nils Wagner
On Mon, 02 Feb 2009 14:07:35 -0600 Ryan May wrote: > Nils Wagner wrote: Is this a 64-bit problem ? >>> I don't know if it's a 64-bit problem per-se, so much as >>> a disagreement between >>> fortran and numpy. Numpy is making the size of the >>> integer fields 8 bytes, while >>> in

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Ryan May
Nils Wagner wrote: >>> Is this a 64-bit problem ? >>> >> I don't know if it's a 64-bit problem per-se, so much as >> a disagreement between >> fortran and numpy. Numpy is making the size of the >> integer fields 8 bytes, while >> in Fortran, they're only 4 bytes. When constructing >> your dtyp

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Nils Wagner
On Mon, 02 Feb 2009 13:38:14 -0600 Ryan May wrote: > Nils Wagner wrote: >> On Mon, 02 Feb 2009 10:17:13 -0600 >> Ryan May wrote: >>> Every write statement in fortran first writes out the >>> number of bytes that will >>> follow, *then* the actual data. So, for instance, the >>> first write

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Ryan May
Nils Wagner wrote: > On Mon, 02 Feb 2009 10:17:13 -0600 > Ryan May wrote: >> Every write statement in fortran first writes out the >> number of bytes that will >> follow, *then* the actual data. So, for instance, the >> first write to file in >> your program will write the bytes corresponding

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Nils Wagner
On Mon, 02 Feb 2009 10:17:13 -0600 Ryan May wrote: > Nils Wagner wrote: >> On Mon, 2 Feb 2009 13:39:32 +0100 >> Matthieu Brucher wrote: >>> Hi, >>> >>> There was a discussion about this last week. You can >>>find it int he >>> archives ;) >>> >>> Matthieu >> >> Hi Matthieu, >> >> Sorry but

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Ryan May
Nils Wagner wrote: > On Mon, 2 Feb 2009 13:39:32 +0100 > Matthieu Brucher wrote: >> Hi, >> >> There was a discussion about this last week. You can find it int he >> archives ;) >> >> Matthieu > > Hi Matthieu, > > Sorry but I missed that. > Anyway I have some trouble with my short example. > >

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Nils Wagner
On Mon, 2 Feb 2009 13:39:32 +0100 Matthieu Brucher wrote: Hi, There was a discussion about this last week. You can find it int he archives ;) Matthieu Hi Matthieu, Sorry but I missed that. Anyway I have some trouble with my short example. g77 -c binary_fortran.f g77 -o io binary_fortra

Re: [Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Matthieu Brucher
Hi, There was a discussion about this last week. You can find it int he archives ;) Matthieu 2009/2/2 Nils Wagner : > Hi all, > > How can I import FORTRAN binary files using numpy ? > > In FORTRAN I can do > > OPEN(10,FILE='test.mat',FORM='unformatted') > > 100 CONTINUE > READ(10

[Numpy-discussion] Fortran binary files and numpy/scipy

2009-02-02 Thread Nils Wagner
Hi all, How can I import FORTRAN binary files using numpy ? In FORTRAN I can do OPEN(10,FILE='test.mat',FORM='unformatted') 100 CONTINUE READ(10,END=999) IROW, ICOL, VALUE GOTO 100 999 CONTINUE END And In Python/numpy ? Any pointer would be apprecia