Discussion: Introducing new operators for matrix computation

Paul Prescod paul at prescod.net
Fri Jul 14 14:09:41 EDT 2000


Huaiyu Zhu wrote:
> 
> ...
>
> How about [x+y: x in [1,2], y in [3,4]]?
> 
> But this has nothing to do with matrices, because one of their main virtue
> is that you do not need to consider the indices.  

I know that it has nothing to do with matrices. My point was that there
is already a patch for Python to allow operations to be "elementwise"
and it is more general than doubling the number of operators in Python.
It allows any expression to be made elementwise (including function
calls and so forth).

-- 
 Paul Prescod - Not encumbered by corporate consensus
It's difficult to extract sense from strings, but they're the only
communication coin we can count on. 
	- http://www.cs.yale.edu/~perlis-alan/quotes.html




More information about the Python-list mailing list