Mark Bakker wrote:
> Thanks, Mike.
> This seems to be a really easy way.
> One more question.
> It turns out my file also contains a character string of 16 characters.
> I tried
> np.fromfile(fd,np.str,16)
>
np.fromfile(fd,np.uint8,16).tostring()
__
On Tue, 10 Mar 2009 16:05:06 +0100, Mark Bakker wrote:
> Thanks, Mike.
> This seems to be a really easy way.
> One more question.
> It turns out my file also contains a character string of 16 characters.
> I tried
> np.fromfile(fd,np.str,16)
> But that gives an error.
> Can I read a characterstrin
Thanks, Mike.
This seems to be a really easy way.
One more question.
It turns out my file also contains a character string of 16 characters.
I tried
np.fromfile(fd,np.str,16)
But that gives an error.
Can I read a characterstring with fromfile?
I know, I can read with fd.read, but I am wondering if
On 3/9/2009 9:45 PM, Mark Bakker wrote:
> How do I read these into Python?
One option is to read the file in Fortran (using the same compiler), and
call Fortran from python using f2py. If you can write the file in
Fortran, you can read the file in Fortran.
Another option to find out how the bi
On Mon, 9 Mar 2009 18:21:45 -0400 "Michael S. Gilbert" wrote:
> On Mon, 9 Mar 2009 21:45:42 +0100, Mark Bakker wrote:
>
> > Hello -
> >
> > I tried to figure this out from the list, but haven't succeeded yet.
> >
> > I have a simple FORTRAN binary file.
> > It contains:
> > 1 integer
> > 1 floa
> On Mon, 9 Mar 2009 21:45:42 +0100, Mark Bakker wrote:
>> I tried to figure this out from the list, but haven't succeeded yet.
>>
>> I have a simple FORTRAN binary file.
>> It contains:
>> 1 integer
>> 1 float
>> 1 array with 16 numbers (float)
>>
>> How do I read these into Python?
there was a l
On Mon, 9 Mar 2009 21:45:42 +0100, Mark Bakker wrote:
> Hello -
>
> I tried to figure this out from the list, but haven't succeeded yet.
>
> I have a simple FORTRAN binary file.
> It contains:
> 1 integer
> 1 float
> 1 array with 16 numbers (float)
>
> How do I read these into Python?
I figure
Hello -
I tried to figure this out from the list, but haven't succeeded yet.
I have a simple FORTRAN binary file.
It contains:
1 integer
1 float
1 array with 16 numbers (float)
How do I read these into Python?
Thanks, Mark
___
Numpy-discussion mailing