[Numpy-discussion] Linux to Windows porting question

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Sep 6 20:10:46 CDT 2005

Daniel Sheltraw wrote:

>     blk = fromstring(f_fid.read(BLOCK_LEN), 
> num_type).byteswapped().astype(Float32).tostring()
> The error I get is:
>     ValueError: string size must be a multiple of element size

Did you open the file in binary mode?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+

More information about the Numpy-discussion mailing list