Re: [Numpy-discussion] loadtxt() behavior on single-line files

2010-07-27 Thread Benjamin Root
On Thu, Jun 24, 2010 at 1:53 PM, Benjamin Root wrote: > On Thu, Jun 24, 2010 at 1:00 PM, Warren Weckesser < > warren.weckes...@enthought.com> wrote: > >> Benjamin Root wrote: >> > Hi, >> > >> > I was having the hardest time trying to figure out an intermittent bug >> > in one of my programs. Ess

Re: [Numpy-discussion] loadtxt() behavior on single-line files

2010-06-24 Thread Benjamin Root
On Thu, Jun 24, 2010 at 1:00 PM, Warren Weckesser < warren.weckes...@enthought.com> wrote: > Benjamin Root wrote: > > Hi, > > > > I was having the hardest time trying to figure out an intermittent bug > > in one of my programs. Essentially, in some situations, it was > > throwing an error saying

Re: [Numpy-discussion] loadtxt() behavior on single-line files

2010-06-24 Thread Christopher Barker
Warren Weckesser wrote: > Benjamin Root wrote: >> Note that this isn't restricted to structured arrays. For regular >> ndarrays, loadtxt() appears to mimic the behavior of np.squeeze(): > > Exactly. The last four lines of the function are: > > X = np.squeeze(X) > if unpack: > r

Re: [Numpy-discussion] loadtxt() behavior on single-line files

2010-06-24 Thread Warren Weckesser
Benjamin Root wrote: > Hi, > > I was having the hardest time trying to figure out an intermittent bug > in one of my programs. Essentially, in some situations, it was > throwing an error saying that the array object was not an array. It > took me a while, but then I figured out that my program

[Numpy-discussion] loadtxt() behavior on single-line files

2010-06-24 Thread Benjamin Root
Hi, I was having the hardest time trying to figure out an intermittent bug in one of my programs. Essentially, in some situations, it was throwing an error saying that the array object was not an array. It took me a while, but then I figured out that my program was assuming that the object retur