[Numpy-discussion] Difference between np.loadtxt depending on whether you supply a file object or a filename

2012-08-20 Thread Andrew Nelson
Dear list, I observe a difference when I try to load a 2D numpy array from a file object compared to if I supply a filename viz: np.version.version '1.5.1' f=open('fit_theoretical.txt') a=np.loadtxt(f) a.shape (1000,) a=np.loadtxt('fit_theoretical.txt') a.shape (500, 2) This strikes me as

Re: [Numpy-discussion] Difference between np.loadtxt depending on whether you supply a file object or a filename

2012-08-20 Thread Sebastian Berg
Hello, On Mo, 2012-08-20 at 20:55 +1000, Andrew Nelson wrote: Dear list, I observe a difference when I try to load a 2D numpy array from a file object compared to if I supply a filename viz: np.version.version '1.5.1' f=open('fit_theoretical.txt') a=np.loadtxt(f) a.shape (1000,)