[Numpy-discussion] greedy loadtxt

lorenzo bolla lbolla at gmail.com
Thu Mar 27 15:05:00 EDT 2008


Thank you all.
The problem with fromfile() is that it doesn't know anything about ndarrays.
If my file is a table of ncols and nrows, fromfile() will give me a 1darray
with nrows*ncols elements, while loadtxt() will give me a 2dmatrix nrows x
ncols. In other words, I loose the "shape" of the table.
L.

On Thu, Mar 27, 2008 at 7:59 PM, Christopher Barker <Chris.Barker at noaa.gov>
wrote:

> Alan G Isaac wrote:
> > I believe Robert fixed this;
> > update from the SVN repository.
>
> lorenzo bolla wrote:
> > Should I use numpy.fromfile, instead?
>
> You can also do that. If fromfile() supports your data format, it will
> be much faster.
>
> -Chris
>
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
Lorenzo Bolla
lbolla at gmail.com
http://lorenzobolla.emurse.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080327/7c0e13f0/attachment.html>


More information about the NumPy-Discussion mailing list