From: Travis O. <oli...@ie...> - 2006-07-07 04:26:15
|
This is a call for a vote on each of the math attributes. Please post your vote as +1 : support +0 : don't care so go ahead -0 : don't care so why do it -1 : against Vote on the following issues separately: 1) .T Have some kind of .T attribute If >0 on this then: a) .T == .swapaxes(-2,-1) b) .T == .transpose() c) .T raises error for ndim > 2 d) .T returns (N,1) array for length (N,) array e) .T returns self for ndim < 2 2) .H returns .T.conj() 3) .M returns matrix version of array 4) .A returns basearray (useful for sub-classes). -Travis |
From: Travis O. <oli...@ie...> - 2006-07-07 04:28:20
|
Travis Oliphant wrote: > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T Have some kind of .T attribute > > +1 > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > +0 > b) .T == .transpose() > -0 > c) .T raises error for ndim > 2 > -1 > d) .T returns (N,1) array for length (N,) array > > +1 > e) .T returns self for ndim < 2 > > -1 > 2) .H returns .T.conj() > > > +0 > 3) .M returns matrix version of array > > +0 > 4) .A returns basearray (useful for sub-classes). > +0 -Travis |
From: Sebastian H. <ha...@ms...> - 2006-07-08 01:37:33
|
Travis Oliphant wrote: > Travis Oliphant wrote: >> This is a call for a vote on each of the math attributes. Please post >> your vote as >> >> +1 : support >> +0 : don't care so go ahead >> -0 : don't care so why do it >> -1 : against >> >> Vote on the following issues separately: >> >> >> >> 1) .T Have some kind of .T attribute >> >> +1 >> If >0 on this then: >> >> a) .T == .swapaxes(-2,-1) >> +1 >> b) .T == .transpose() >> -0 >> c) .T raises error for ndim > 2 >> -1 >> d) .T returns (N,1) array for length (N,) array >> >> +1 >> e) .T returns self for ndim < 2 >> >> -1 >> 2) .H returns .T.conj() >> >> >> +0 > >> 3) .M returns matrix version of array >> >> +0 >> 4) .A returns basearray (useful for sub-classes). >> +0 Sebastian Haase |
From: Robert K. <rob...@gm...> - 2006-07-07 04:48:27
|
Travis Oliphant wrote: > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > 1) .T Have some kind of .T attribute > > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > b) .T == .transpose() > c) .T raises error for ndim > 2 > d) .T returns (N,1) array for length (N,) array > e) .T returns self for ndim < 2 The fact that there are a, b, c, d, and e makes me fully -1 on this. In the face of ambiguity, refuse the temptation to guess. > 2) .H returns .T.conj() -1 > 3) .M returns matrix version of array -1 > 4) .A returns basearray (useful for sub-classes). -1 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Sasha <nd...@ma...> - 2006-07-07 04:53:33
|
On 7/7/06, Travis Oliphant <oli...@ie...> wrote: > 1) .T Have some kind of .T attribute > -1 (but -0 if raises an error if ndim != 2) > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > > b) .T == .transpose() > > c) .T raises error for ndim > 2 > > d) .T returns (N,1) array for length (N,) array > > e) .T returns self for ndim < 2 > Write-in: f) .T raises error for ndim != 2 (still <0) > > 2) .H returns .T.conj() > -1 > > 3) .M returns matrix version of array > -1 > > 4) .A returns basearray (useful for sub-classes). > -1 |
From: Bill B. <wb...@gm...> - 2006-07-07 06:29:07
|
On 7/7/06, Travis Oliphant <oli...@ie...> wrote: > > > 1) .T Have some kind of .T attribute +1 If >0 on this then: > > a) .T == .swapaxes(-2,-1) +1 b) .T == .transpose() +0 c) .T raises error for ndim > 2 +0 d) .T returns (N,1) array for length (N,) array +1 e) .T returns self for ndim < 2 +0 2) .H returns .T.conj() +1 3) .M returns matrix version of array -1 4) .A returns basearray (useful for sub-classes). +0 |
From: Sven S. <sve...@gm...> - 2006-07-07 08:40:49
|
Travis Oliphant schrieb: > > 1) .T Have some kind of .T attribute > +0 (the discussion in the .T thread convinced me it's better to keep the matrix playground as a separate subclass, and so it's not important for me what happens with pure arrays) > > 2) .H returns .T.conj() +0 > > > 3) .M returns matrix version of array +1 !! (Either that, or I will soon get on your nerves demanding matrix versions of ones, zeros, rand, eye etc.!) > > > 4) .A returns basearray (useful for sub-classes). +0 ? (Already exists for matrix, doesn't it?) -sven |
From: Ed S. <sch...@ft...> - 2006-07-07 09:06:37
|
On 07/07/2006, at 6:26 AM, Travis Oliphant wrote: > 1) .T Have some kind of .T attribute -1 The meaning of .T is unclear for ndim != 2, as the plethora of sub- vote options shows. And we already have a matrix object designed explicitly for the case ndim == 2. Let's make matrix objects more useful, rather than give up on matrices and hard-wire 2d concepts into arrays. I'm willing to help with this, and I'll post some ideas to a different thread. > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > > b) .T == .transpose() > > c) .T raises error for ndim > 2 > > d) .T returns (N,1) array for length (N,) array > > e) .T returns self for ndim < 2 (Just for the record, I think option (d) is positively evil.) > 2) .H returns .T.conj() -1 I'm against this for the same reasons I'm against .T, but more strongly, due to the extra memory allocation. > 3) .M returns matrix version of array -0 This would have the advantage of making .T and .H redundant for 2-d arrays, since they'd be accessible as matrix attributes anyway. But I don't see a strong enough case for this as an extra attribute, since asmatrix() and mat() are available anyway. I would like to deprecate mat() as an alias for matrix (by moving mat to the oldnumeric namespace); this would break the expectation that mat() perform a copy, and allow users to write >>> from numpy import asmatrix as mat instead if they need a short, simple syntax that avoids the copy overhead. It's also trivial for any serious user of matrices to write wrapper functions for ones, zeros, etc., such as def matones(*args): return asmatrix(ones(*args)) There might be an argument for including these in e.g. the numpy.matrix namespace. This would make a .M attribute even less compelling. > 4) .A returns basearray (useful for sub-classes). -0 This could be a good idea, but I'm not clear enough on its implications to vote either way. -- Ed |
From: Bruce S. <bso...@gm...> - 2006-07-07 13:03:27
|
On 7/6/06, Travis Oliphant <oli...@ie...> wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T Have some kind of .T attribute -1 because I prefer what is already present although I would prefer the option of inplace or a taking a copy. Also I don't find .T particularly intuitive (for example, R and SAS IML have a t() function - SAS IML also uses a backtick but that has not been very portable). > > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > > b) .T == .transpose() > > c) .T raises error for ndim > 2 > > d) .T returns (N,1) array for length (N,) array > > e) .T returns self for ndim < 2 > > > 2) .H returns .T.conj() -/+0 I don't care either way. > > > 3) .M returns matrix version of array -1 as I think asmatrix etc is clearer. > > > 4) .A returns basearray (useful for sub-classes). -1 as I think something like asarray etc is clearer and require explicit calling. > > > > -Travis > > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |
From: Paulo J. da S. e S. <pjs...@im...> - 2006-07-07 13:13:48
|
Em Qui, 2006-07-06 às 22:26 -0600, Travis Oliphant escreveu: > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T Have some kind of .T attribute +1 > > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > +0 > b) .T == .transpose() > -0 > c) .T raises error for ndim > 2 > +0 > d) .T returns (N,1) array for length (N,) array > +0 > e) .T returns self for ndim < 2 -1 > 2) .H returns .T.conj() > +0 > 3) .M returns matrix version of array > -1 > 4) .A returns basearray (useful for sub-classes). > +0 Paulo -- Paulo José da Silva e Silva Professor Assistente do Dep. de Ciência da Computação (Assistant Professor of the Computer Science Dept.) Universidade de São Paulo - Brazil e-mail: pjs...@im... Web: http://www.ime.usp.br/~pjssilva Teoria é o que não entendemos o (Theory is something we don't) suficiente para chamar de prática. (understand well enough to call) (practice) |
From: Robert H. <rhe...@ma...> - 2006-07-07 14:06:41
|
+1 1b) .T == .transpose() -1 all others On Jul 7, 2006, at 12:26 AM, Travis Oliphant wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T Have some kind of .T attribute > > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > > b) .T == .transpose() > > c) .T raises error for ndim > 2 > > d) .T returns (N,1) array for length (N,) array > > e) .T returns self for ndim < 2 > > > 2) .H returns .T.conj() > > > 3) .M returns matrix version of array > > > 4) .A returns basearray (useful for sub-classes). > > > > -Travis > > > > > > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion |
From: Stefan v. d. W. <st...@su...> - 2006-07-07 14:07:07
|
On Thu, Jul 06, 2006 at 10:26:12PM -0600, Travis Oliphant wrote: > 1) .T Have some kind of .T attribute -1, since the expected behaviour of .T is different depending on problem context. > a) .T =3D=3D .swapaxes(-2,-1) The fact that this was proposed just demonstrates the fact. If you have a (10,5) array, .T gives the expected (5,10) array. But if you have a (10,10,3) RGB image as an ndarray, .T gives a (10,3,10) array... which is certainly not what you'd expect in an image processing context. St=E9fan |
From: Paul B. <peb...@gm...> - 2006-07-07 14:22:54
|
On 7/7/06, Travis Oliphant <oli...@ie...> wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T Have some kind of .T attribute -1 > If >0 on this then: > > a) .T == .swapaxes(-2,-1) > > b) .T == .transpose() > > c) .T raises error for ndim > 2 > > d) .T returns (N,1) array for length (N,) array > > e) .T returns self for ndim < 2 > > > 2) .H returns .T.conj() -1 > 3) .M returns matrix version of array -1 > 4) .A returns basearray (useful for sub-classes). -1 |
From: George N. <gn...@go...> - 2006-07-07 14:31:11
|
On 07/07/06, Travis Oliphant <oli...@ie...> wrote: > > This is a call for a vote on each of the math attributes. Please post > your vote as > > +1 : support > +0 : don't care so go ahead > -0 : don't care so why do it > -1 : against > > Vote on the following issues separately: > > > > 1) .T Have some kind of .T attribute +1 > > If >0 on this then: > > a) .T == .swapaxes(-2,-1) -1 > > b) .T == .transpose() > > c) .T raises error for ndim > 2 -1 > > d) .T returns (N,1) array for length (N,) array -1 > > e) .T returns self for ndim < 2 +1 > > > 2) .H returns .T.conj() -1 > > > 3) .M returns matrix version of array -1 > > > 4) .A returns basearray (useful for sub-classes). -0 George. |
From: Charles R H. <cha...@gm...> - 2006-07-07 15:20:49
|
Does anyone use transpose for anything besides two dimensional arrays? For arrays that aren't matrices at heart the meaning of transpose is pretty arbitrary, so the only virtue I see in having an attribute would be less typeing. So put it in the documentation. As an aside, being able to specify axis in dot might obviate many cases of *.T and *.H and make inner a special case. > > > 1) .T Have some kind of .T attribute +1 > > > If >0 on this then: > > > > a) .T == .swapaxes(-2,-1) -1 > b) .T == .transpose() +1 > c) .T raises error for ndim > 2 -1 > > > d) .T returns (N,1) array for length (N,) array -1 > e) .T returns self for ndim < 2 +1 > > > 2) .H returns .T.conj() +1 > > > 3) .M returns matrix version of array no opinion. > > > 4) .A returns basearray (useful for sub-classes). no opinion Chuck |