[PYTHON MATRIX-SIG] Let's get going

Jonne Itkonen ji@tarzan.math.jyu.fi
Tue, 12 Sep 1995 12:17:13 +0300 (EETDST)


On Tue, 12 Sep 1995, Graham Hughes wrote:

> >I'd rather see multiplication and division not be elementwise.  But I
> >don't feel strongly about this.
> 
> Ah, but I'd prefer it be elementwise because it allows me to do wonderful
> APLish things with it :)

I prefer the mathematical, not elementwise multiplication. We are handling
matrixes here (not tables!). Besides, one doesn't want to define the * 
operator for complex numbers to do 'elementwise' multiplication, does she? 
It would be meaningless!

In my opinion, the overloading of operators is to make things more clear 
than to mess them up. The elementwise multiplication by * operator would 
be clear to anyone with no knowledge of matrices, but not to someone who 
knows what matrices are.

Perhaps a table object should be developed for elementwise calculation?

> A good reason for having multiplication/division (same thing on a
> mathematical level, although much stickier anywhere else) elementwise is
> that addition and subtraction already are, and it would be confusing to do

That is not a good reason. It's more confusing to use mathematical
definition for some, and non-mathematical definitions for other operators,
as in your '+ vs. *' example. 

  -Jonne

URL: http://www.math.jyu.fi/~ji/


=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================