From: Sasha <nd...@ma...> - 2006-07-06 19:38:02
|
On 7/6/06, Tim Hochberg <tim...@co...> wrote: > ... > Overloading '+' sure seems perverse, but maybe that's just me. > The first time I saw it, it seemed perverse to me as well, but it actually make a lot of sense: 1. It is visually appealing as in '+' makes '|' from '-' and '-' from '|' and looks close enough to 't'. 2. It puts an otherwise useless operator to work. 3. Prefix spelling suggests that it should be swapaxes(0,1) rather than swapaxes(-2,-1), which is the choice made by K. 4. You can't get any shorter than that (at least using a fixed width font :-). 5. It already does the right thing for rank<2. |