[Pythoncheckins] CVS: python/nondist/peps pep0211.txt,1.4,1.5
Barry Warsaw
pythondev@python.org
Sun, 26 Nov 2000 21:41:48 0800
Update of /cvsroot/python/python/nondist/peps
In directory slayer.i.sourceforge.net:/tmp/cvsserv20595
Modified Files:
pep0211.txt
Log Message:
Greg Wilson's latest.
Index: pep0211.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep0211.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff C2 r1.4 r1.5
*** pep0211.txt 2000/11/22 22:01:47 1.4
 pep0211.txt 2000/11/27 05:41:46 1.5
***************
*** 21,25 ****
! Proposal
Add a single new infix binary operator '@' ("across"), and
 21,25 
! Summary
Add a single new infix binary operator '@' ("across"), and
***************
*** 142,177 ****
A new operator '@' (pronounced "across") will be added to Python,
along with special methods "__across__()", "__racross__()", and
! "__iacross__()", with the usual semantics.
!
! NumPy will overload "@" to perform mathematical multiplication of
! arrays where shapes permit, and to throw an exception otherwise.
! Its implementation of "@" will treat builtin sequence types as if
! they were column vectors. This takes care of the cases MM and MV.
!
! An attribute "T" will be added to the NumPy array type, such that
! "m.T" is:
!
! (a) the transpose of "m" for a 2dimensional array
!
! (b) the 1xN matrix transpose of "m" if "m" is a 1dimensional
! array; or
!
! (c) a runtime error for an array with rank >= 3.
!
! This attribute will alias the memory of the base object. NumPy's
! "transpose()" function will be extended to turn builtin sequence
! types into row vectors. This takes care of the VM, VD, and VO
! cases. We propose an attribute because:
!
! (a) the resulting notation is similar to the 'superscript T' (at
! least, as similar as ASCII allows), and
 (b) it signals that the transposition aliases the original object.

No new operators will be defined to mean "solve a set of linear
! equations", or "invert a matrix". Instead, NumPy will define a
! value "inv", which will be recognized by the exponentiation
! operator, such that "A ** inv" is the inverse of "A". This is
! similar in spirit to NumPy's existing "newaxis" value.
(Optional) When applied to sequences, the "@" operator will return
 142,151 
A new operator '@' (pronounced "across") will be added to Python,
along with special methods "__across__()", "__racross__()", and
! "__iacross__()", with the usual semantics. (We recommend using
! "@", rather than the timeslike "><", because of the ease with
! which the latter could be mistyped as inequality "<>".)
No new operators will be defined to mean "solve a set of linear
! equations", or "invert a matrix".
(Optional) When applied to sequences, the "@" operator will return
***************
*** 294,298 ****
0225 : Elementwise/Objectwise Operators
! A (much) larger proposal that addresses the same subject.
 268,273 
0225 : Elementwise/Objectwise Operators
! A larger proposal that addresses the same subject, but
! which proposes many more additions to the language.
***************
*** 313,330 ****
[7] http://www.python.org/pipermail/pythonlist/2000August/112529.html
! Appendix: Other Operations
! We considered syntactic support for three other operations:
! T
! (a) transposition: A => A[j, i] for A[i, j]
! 1
! (b) inverse: A => A' such that A' * A = I (the identity matrix)
! (c) solution: A/b => x such that A * x = b
! A\b => x such that x * A = b
 288,323 
[7] http://www.python.org/pipermail/pythonlist/2000August/112529.html
+
+ Appendix: NumPy
! NumPy will overload "@" to perform mathematical multiplication of
! arrays where shapes permit, and to throw an exception otherwise.
! Its implementation of "@" will treat builtin sequence types as if
! they were column vectors. This takes care of the cases MM and MV.
+ An attribute "T" will be added to the NumPy array type, such that
+ "m.T" is:
! (a) the transpose of "m" for a 2dimensional array
! (b) the 1xN matrix transpose of "m" if "m" is a 1dimensional
! array; or
! (c) a runtime error for an array with rank >= 3.
!
! This attribute will alias the memory of the base object. NumPy's
! "transpose()" function will be extended to turn builtin sequence
! types into row vectors. This takes care of the VM, VD, and VO
! cases. We propose an attribute because:
!
! (a) the resulting notation is similar to the 'superscript T' (at
! least, as similar as ASCII allows), and
!
! (b) it signals that the transposition aliases the original object.
! NumPy will define a value "inv", which will be recognized by the
! exponentiation operator, such that "A ** inv" is the inverse of
! "A". This is similar in spirit to NumPy's existing "newaxis"
! value.