Discussion: Introducing new operators for matrix computation

Gregory Lielens gregory.lielens at fft.be
Fri Jul 14 08:51:05 EDT 2000


> >>The main thing I'd think about in addition to standard MATLAB syntax
> >>is a natural 'prolongation' syntax.
> What I mean is, given vectors, e.g.,
> 
> d = [d1 d2]
> c = [ c1 c2 c3]
> 
> an apparently incorrect element-wise multiplication like
> 
> d'.*c
> 
> would be interpreted as
> 
> [d1 d1 d1; d2 d2 d2].*[c1 c2 c3;c1 c2 c3]
> 
which is a classical matrix product d'*c, I think,at least if you
distinguish between line and column vectors...

Is there other uses of the prolongation syntax wich is not feasable with
an inner product c=a at b defined as
c(i1,...,in,k1,...,km)= sum_over_j(a(i1,...,in,j) * b(j,k1,...,km)), and
well choosen dimensions for a and c?
If creation of dummy dimension in arrays (i.e. with size 1) is easy, I
think it is a good (better?) alternative
to prolongation...

Such inner product is valid for array of arbitrary dimensions, and
degenerate to matrix product when both operands are matrix, it should
thus be suitable to both for NumPy and MatPy...
I think it is valid proposition for the meaning of the new
multiplicative operator, should such operator be adopted (and I hope so
:-))


Greg.



More information about the Python-list mailing list