[Numpy-discussion] Difference in the number of elements in a fromfile() between Windows and Linux

Matthieu Brucher matthieu.brucher at gmail.com
Fri May 4 04:01:16 EDT 2007


>
> tofile is using pickling, right ? If you dump to a text file, there may
> be a problem because of end of line ?


I'm not using the binary form, so it's not pickling.
Example of the first line of my data file :
0.0 inf 13.9040914426 14.7406669444 inf 4.41783247603 inf inf
6.05071515635inf inf inf
15.6925185021 inf inf inf inf inf inf inf

> Is this a known behaviour ? How could I load these correctly under
> > both platforms (I don't want to save them in binary form, I'm using
> > the files for other purpose -
> Personally, I always use pytables: the file format (hdf5) is binary, but
> the file format has a standard C api (and C++/java as well), which means
> you can access those files pretty much anywhere, and is designed to be
> cross platform.


Well, that would be a solution, but for the moment, I can't use this
solution.. I use a lot of computers, and I can't install the packages I
want, and their latest version - for instance Feisty that has only numpy
1.0.1 and scipy 0.5.1... -
Besides, pure beginners, that do not know of the - excellent - pytables,
will use a text format - simple to check visually the results for instance -
and will run into this behaviour :(

Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070504/67c50f4d/attachment.html>


More information about the NumPy-Discussion mailing list