From: Robert K. <rk...@uc...> - 2005-09-06 18:49:17
|
Daniel Sheltraw wrote: > Hello NumPy Listees > > I am trying to port some code to Windows that works fine under Linux. > The offending line > is: > > 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 > > Does anyone have an idea where the problem might be? BLOCK_LEN is > specified in bytes > and num_type is Int32. Is f_fid opened in binary mode? f_fid = open(filename, 'rb') It should be. -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |