Re: [Numpy-discussion] PEP: named axis

2009-02-11 Thread Andrew Jaffe
Pauli Virtanen wrote: > Wed, 11 Feb 2009 22:21:30 +, Andrew Jaffe wrote: > [clip] >> Maybe I misunderstand the proposal, but, actually, I think this is >> completely the wrong semantics for "axis=" anyway. "axis=" in numpy >> refers to what is also a dimension, not a column. > > I think the

Re: [Numpy-discussion] PEP: named axis

2009-02-11 Thread Pauli Virtanen
Wed, 11 Feb 2009 22:21:30 +, Andrew Jaffe wrote: [clip] > Maybe I misunderstand the proposal, but, actually, I think this is > completely the wrong semantics for "axis=" anyway. "axis=" in numpy > refers to what is also a dimension, not a column. I think the proposal was to add the ability

Re: [Numpy-discussion] PEP: named axis

2009-02-11 Thread Andrew Jaffe
Robert Kern wrote: > On Fri, Feb 6, 2009 at 03:22, Stéfan van der Walt wrote: >> Hi Robert >> >> 2009/2/6 Robert Kern : This could be implemented but would require adding information to the NumPy array. >>> More than that, though. Every function and method that takes an axis >>> or reduc

Re: [Numpy-discussion] PEP: named axis

2009-02-11 Thread Lars Friedrich
Hello list, I am not sure, if I understood everything of the discussion on the named-axis-idea of numpy-arrays, since I am only a *user* of numpy. I never subclassed the numpy-array-class ;-) However, I have the need to store meta-information for my arrays. I do this with a stand-alone class w

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Alan Jackson
On Thu, 05 Feb 2009 22:17:54 -0600 Travis Oliphant wrote: > Gael Varoquaux wrote: > > On Thu, Feb 05, 2009 at 05:08:49PM -0600, Travis E. Oliphant wrote: > > > >> I've been fairly quiet on this list for awhile due to work and family > >> schedule, but I think about how things can improve regu

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Ryan May
On Fri, Feb 6, 2009 at 3:30 PM, Robert Kern wrote: > On Fri, Feb 6, 2009 at 03:22, Stéfan van der Walt > wrote: > > Hi Robert > > > > 2009/2/6 Robert Kern : > >>> This could be implemented but would require adding information to the > >>> NumPy array. > >> > >> More than that, though. Every func

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Robert Kern
On Fri, Feb 6, 2009 at 03:22, Stéfan van der Walt wrote: > Hi Robert > > 2009/2/6 Robert Kern : >>> This could be implemented but would require adding information to the >>> NumPy array. >> >> More than that, though. Every function and method that takes an axis >> or reduces an axis will need to b

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Robert Kern
On Fri, Feb 6, 2009 at 09:31, Bruce Southey wrote: > Hi, > +1 on the idea but how will this work with other numpy methods? > > suppose *arr* is a structured array with dtype: > > [('name', 'S25'), > ('height', float), > ('age', int), > ('gender', 'S8') > ] > > > Would you be able to first defin

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Darren Dale
On Fri, Feb 6, 2009 at 12:09 PM, Christopher Barker wrote: > Darren Dale wrote: > > I have a package (nearly ready to > > submit to this list for request for comment) that uses a dict subclass > > to describe the dimensionality of a quantity, like {m:1, s:-1}. > > I'm looking forward to that -- yo

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Christopher Barker
Darren Dale wrote: > I have a package (nearly ready to > submit to this list for request for comment) that uses a dict subclass > to describe the dimensionality of a quantity, like {m:1, s:-1}. I'm looking forward to that -- you may have just saved me a bunch of coding! -Chris -- Christopher

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Bruce Southey
Hi, +1 on the idea but how will this work with other numpy methods? suppose *arr* is a structured array with dtype: [('name', 'S25'), ('height', float), ('age', int), ('gender', 'S8') ] Would you be able to first define a list of columns such as cols=['height', 'age'] arr[cols] This woul

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Darren Dale
On Fri, Feb 6, 2009 at 4:22 AM, Stéfan van der Walt wrote: > Hi Robert > > 2009/2/6 Robert Kern : > >> This could be implemented but would require adding information to the > >> NumPy array. > > > > More than that, though. Every function and method that takes an axis > > or reduces an axis will ne

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Stéfan van der Walt
Hi Robert 2009/2/6 Robert Kern : >> This could be implemented but would require adding information to the >> NumPy array. > > More than that, though. Every function and method that takes an axis > or reduces an axis will need to be rewritten. For that reason, I'm -1 > on the proposal. Are you -1

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Gael Varoquaux
On Fri, Feb 06, 2009 at 12:20:37AM -0600, Robert Kern wrote: > On Fri, Feb 6, 2009 at 00:13, Christopher Barker > wrote: > > Travis Oliphant wrote: > >> What do people think > >> about adding a default dictionary to every instance of a NumPy array. > > It sound kind of heavyweight to me. I ten

Re: [Numpy-discussion] PEP: named axis

2009-02-06 Thread Gael Varoquaux
On Thu, Feb 05, 2009 at 10:29:42PM -0600, Robert Kern wrote: > >> I have no opinion on the above, as I don't have this use case. However, as > >> you are talking about implementing something, I jump on the occasion to > >> suggest another gadget, slightly related: I would like named axis. > >> Supp

Re: [Numpy-discussion] PEP: named axis (was: Selection of only a certain number of fields)

2009-02-05 Thread Olivier Grisel
+1 On Feb 6, 2009 12:16 AM, "Gael Varoquaux" wrote: On Thu, Feb 05, 2009 at 05:08:49PM -0600, Travis E. Oliphant wrote: > I've been fairly quiet on this list for awhile due to work and family > schedule, but I think about how things can improve regularly.One > feature that's been requested b

Re: [Numpy-discussion] PEP: named axis

2009-02-05 Thread Robert Kern
On Fri, Feb 6, 2009 at 00:13, Christopher Barker wrote: > Travis Oliphant wrote: >> What do people think >> about adding a default dictionary to every instance of a NumPy array. > > It sound kind of heavyweight to me. I tend to use lots of small arrays > (to represent an x,y point, for instance)

Re: [Numpy-discussion] PEP: named axis

2009-02-05 Thread Christopher Barker
Travis Oliphant wrote: > What do people think > about adding a default dictionary to every instance of a NumPy array. It sound kind of heavyweight to me. I tend to use lots of small arrays (to represent an x,y point, for instance). There are enough performance issues with that as it stands. Ma

Re: [Numpy-discussion] PEP: named axis

2009-02-05 Thread Robert Kern
On Thu, Feb 5, 2009 at 22:17, Travis Oliphant wrote: > Gael Varoquaux wrote: >> On Thu, Feb 05, 2009 at 05:08:49PM -0600, Travis E. Oliphant wrote: >> >>> I've been fairly quiet on this list for awhile due to work and family >>> schedule, but I think about how things can improve regularly.One

Re: [Numpy-discussion] PEP: named axis

2009-02-05 Thread Travis Oliphant
Gael Varoquaux wrote: > On Thu, Feb 05, 2009 at 05:08:49PM -0600, Travis E. Oliphant wrote: > >> I've been fairly quiet on this list for awhile due to work and family >> schedule, but I think about how things can improve regularly.One >> feature that's been requested by a few people is the

[Numpy-discussion] PEP: named axis (was: Selection of only a certain number of fields)

2009-02-05 Thread Gael Varoquaux
On Thu, Feb 05, 2009 at 05:08:49PM -0600, Travis E. Oliphant wrote: > I've been fairly quiet on this list for awhile due to work and family > schedule, but I think about how things can improve regularly.One > feature that's been requested by a few people is the ability to select > multiple f