Re: [Numpy-discussion] loadtxt ndmin option

2011-06-19 Thread Derek Homeier
On 31 May 2011, at 21:28, Pierre GM wrote: > On May 31, 2011, at 6:37 PM, Derek Homeier wrote: > >> On 31 May 2011, at 18:25, Pierre GM wrote: >> >>> On May 31, 2011, at 5:52 PM, Derek Homeier wrote: I think stuff like multiple delimiters should have been dealt with before, as the r

Re: [Numpy-discussion] loadtxt ndmin option

2011-06-03 Thread cgraves
Derek Homeier wrote: > > Hi Chris, > > On 31 May 2011, at 13:56, cgraves wrote: > >> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin >> option, >> however neither genfromtxt nor recfromtxt, which use loadtxt, have it. >> Should they have inherited the option? Who can make

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 6:37 PM, Derek Homeier wrote: > On 31 May 2011, at 18:25, Pierre GM wrote: > >> On May 31, 2011, at 5:52 PM, Derek Homeier wrote: >>> >>> I think stuff like multiple delimiters should have been dealt with >>> before, as the right place to insert the ndmin code (which include

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 18:25, Pierre GM wrote: > On May 31, 2011, at 5:52 PM, Derek Homeier wrote: >> >> I think stuff like multiple delimiters should have been dealt with >> before, as the right place to insert the ndmin code (which includes >> the decision to squeeze or not to squeeze as well as to

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 5:52 PM, Derek Homeier wrote: > > I think stuff like multiple delimiters should have been dealt with > before, as the right place to insert the ndmin code (which includes > the decision to squeeze or not to squeeze as well as to add additional > dimensions, if required)

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 17:45, Benjamin Root wrote: > > At this point, I wonder if it might be smarter to create > a .atleast_Nd() function and use that everywhere it is needed. > Having similar logic tailored for each loading function might be a > little dangerous if bug fixes are made to one, b

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 17:33, Bruce Southey wrote: >>> It certainly would make sense to provide the same functionality for >>> genfromtxt (which should then be inherited by [nd,ma,rec]fromtxt), >>> so >>> I'd go ahead and file a feature (enhancement) request. I can't >>> promise >>> I can take car

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Benjamin Root
On Tue, May 31, 2011 at 10:33 AM, Bruce Southey wrote: > On 05/31/2011 10:18 AM, Pierre GM wrote: > > On May 31, 2011, at 4:53 PM, Derek Homeier wrote: > > > >> Hi Chris, > >> > >> On 31 May 2011, at 13:56, cgraves wrote: > >> > >>> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndm

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Bruce Southey
On 05/31/2011 10:18 AM, Pierre GM wrote: > On May 31, 2011, at 4:53 PM, Derek Homeier wrote: > >> Hi Chris, >> >> On 31 May 2011, at 13:56, cgraves wrote: >> >>> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin >>> option, >>> however neither genfromtxt nor recfromtxt, which use l

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 4:53 PM, Derek Homeier wrote: > Hi Chris, > > On 31 May 2011, at 13:56, cgraves wrote: > >> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin >> option, >> however neither genfromtxt nor recfromtxt, which use loadtxt, have it. >> Should they have inherited

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
Hi Chris, On 31 May 2011, at 13:56, cgraves wrote: > I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin > option, > however neither genfromtxt nor recfromtxt, which use loadtxt, have it. > Should they have inherited the option? Who can make it happen? you are mistaken, genfromt

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread cgraves
Ralf Gommers-2 wrote: > > On Fri, May 6, 2011 at 12:57 PM, Derek Homeier < > de...@astro.physik.uni-goettingen.de> wrote: > >> >> On 6 May 2011, at 07:53, Ralf Gommers wrote: >> >> > >> > >> Looks okay, and I agree that it's better to fix it now. The timing >> > >> is a bit unfortunate though,

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-07 Thread Ralf Gommers
On Fri, May 6, 2011 at 12:57 PM, Derek Homeier < de...@astro.physik.uni-goettingen.de> wrote: > > On 6 May 2011, at 07:53, Ralf Gommers wrote: > > > > > >> Looks okay, and I agree that it's better to fix it now. The timing > > >> is a bit unfortunate though, just after RC2. I'll have closer look >

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-06 Thread Derek Homeier
On 6 May 2011, at 07:53, Ralf Gommers wrote: > > >> Looks okay, and I agree that it's better to fix it now. The timing > >> is a bit unfortunate though, just after RC2. I'll have closer look > >> tomorrow and if it can go in, probably tag RC3. > >> > >> If in the meantime a few more people could

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Ralf Gommers
On Fri, May 6, 2011 at 12:12 AM, Derek Homeier < de...@astro.physik.uni-goettingen.de> wrote: > > On 5 May 2011, at 22:53, Derek Homeier wrote: > > >> > >> However, the problem that ndmin is supposed to address is not fixed > >> by the current implementation for the rc. Essentially, a single- > >

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Derek Homeier
On 5 May 2011, at 22:53, Derek Homeier wrote: >> >> However, the problem that ndmin is supposed to address is not fixed >> by the current implementation for the rc. Essentially, a single- >> row, multi-column file with ndmin=2 comes out as a Nx1 array which >> is the same result for a multi-row,

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Derek Homeier
On 5 May 2011, at 22:31, Ralf Gommers wrote: > > On Thu, May 5, 2011 at 9:46 PM, Benjamin Root wrote: > > > On Thu, May 5, 2011 at 2:33 PM, Ralf Gommers > wrote: > > > On Thu, May 5, 2011 at 9:18 PM, Benjamin Root wrote: > > > On Thu, May 5, 2011 at 1:08 PM, Paul Anton Letnes > > wrote: > > O

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Ralf Gommers
On Thu, May 5, 2011 at 9:46 PM, Benjamin Root wrote: > > > On Thu, May 5, 2011 at 2:33 PM, Ralf Gommers > wrote: > >> >> >> On Thu, May 5, 2011 at 9:18 PM, Benjamin Root wrote: >> >>> >>> >>> On Thu, May 5, 2011 at 1:08 PM, Paul Anton Letnes < >>> paul.anton.let...@gmail.com> wrote: >>> >>

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Benjamin Root
On Thu, May 5, 2011 at 2:33 PM, Ralf Gommers wrote: > > > On Thu, May 5, 2011 at 9:18 PM, Benjamin Root wrote: > >> >> >> On Thu, May 5, 2011 at 1:08 PM, Paul Anton Letnes < >> paul.anton.let...@gmail.com> wrote: >> >>> >>> On 5. mai 2011, at 08.49, Benjamin Root wrote: >>> >>> > >>> > >>> > On W

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Ralf Gommers
On Thu, May 5, 2011 at 9:18 PM, Benjamin Root wrote: > > > On Thu, May 5, 2011 at 1:08 PM, Paul Anton Letnes < > paul.anton.let...@gmail.com> wrote: > >> >> On 5. mai 2011, at 08.49, Benjamin Root wrote: >> >> > >> > >> > On Wed, May 4, 2011 at 11:08 PM, Paul Anton Letnes < >> paul.anton.let...@g

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Benjamin Root
On Thu, May 5, 2011 at 1:08 PM, Paul Anton Letnes < paul.anton.let...@gmail.com> wrote: > > On 5. mai 2011, at 08.49, Benjamin Root wrote: > > > > > > > On Wed, May 4, 2011 at 11:08 PM, Paul Anton Letnes < > paul.anton.let...@gmail.com> wrote: > > > > On 4. mai 2011, at 20.33, Benjamin Root wrote:

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Paul Anton Letnes
On 5. mai 2011, at 08.49, Benjamin Root wrote: > > > On Wed, May 4, 2011 at 11:08 PM, Paul Anton Letnes > wrote: > > On 4. mai 2011, at 20.33, Benjamin Root wrote: > > > On Wed, May 4, 2011 at 7:54 PM, Derek Homeier > > wrote: > > On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote: > > > >

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Benjamin Root
On Thu, May 5, 2011 at 10:49 AM, Benjamin Root wrote: > > > On Wed, May 4, 2011 at 11:08 PM, Paul Anton Letnes < > paul.anton.let...@gmail.com> wrote: > >> >> On 4. mai 2011, at 20.33, Benjamin Root wrote: >> >> > On Wed, May 4, 2011 at 7:54 PM, Derek Homeier < >> de...@astro.physik.uni-goettinge

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-05 Thread Benjamin Root
On Wed, May 4, 2011 at 11:08 PM, Paul Anton Letnes < paul.anton.let...@gmail.com> wrote: > > On 4. mai 2011, at 20.33, Benjamin Root wrote: > > > On Wed, May 4, 2011 at 7:54 PM, Derek Homeier < > de...@astro.physik.uni-goettingen.de> wrote: > > On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote: >

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-04 Thread Paul Anton Letnes
On 4. mai 2011, at 20.33, Benjamin Root wrote: > On Wed, May 4, 2011 at 7:54 PM, Derek Homeier > wrote: > On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote: > > > But: Isn't the numpy.atleast_2d and numpy.atleast_1d functions written for > > this? Shouldn't we reuse them? Perhaps it's overkil

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-04 Thread Benjamin Root
On Wed, May 4, 2011 at 7:54 PM, Derek Homeier < de...@astro.physik.uni-goettingen.de> wrote: > On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote: > > > But: Isn't the numpy.atleast_2d and numpy.atleast_1d functions written > for this? Shouldn't we reuse them? Perhaps it's overkill, and perhaps it

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-04 Thread Derek Homeier
On 05.05.2011, at 2:40AM, Paul Anton Letnes wrote: > But: Isn't the numpy.atleast_2d and numpy.atleast_1d functions written for > this? Shouldn't we reuse them? Perhaps it's overkill, and perhaps it will > reintroduce the 'transposed' problem? Yes, good point, one could replace the X.shape = (

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-04 Thread Paul Anton Letnes
On 4. mai 2011, at 17.34, Derek Homeier wrote: > Hi Paul, > > I've got back to your suggestion re. the ndmin flag for loadtxt from a few > weeks ago... > > On 27.03.2011, at 12:09PM, Paul Anton Letnes wrote: > 1562: I attach a possible patch. This could also be the default be

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-04 Thread Derek Homeier
Hi Paul, I've got back to your suggestion re. the ndmin flag for loadtxt from a few weeks ago... On 27.03.2011, at 12:09PM, Paul Anton Letnes wrote: >>> 1562: >>> I attach a possible patch. This could also be the default >>> behavior to my mind, since the function caller can simply call >>