Discussion: new operators for numerical computation
Huaiyu Zhu
hzhu at knowledgetrack.com
Mon Jul 24 17:44:04 EDT 2000
On 24 Jul 2000 12:47:32 +0200, Konrad Hinsen <hinsen at cnrs-orleans.fr> wrote:
>>
>> 1. Is it necessary to distiguish inner and outer? With Greg's indexing
>> rules these are essentially the same. Six would be enough.
>
>What are "Greg's indexing rules"? Inner and outer product are entirely
>different operations in my mind, although in principle the inner
>product can be thought of as an outer product followed by a summation.
>I think that implementation issues also call for separate operators;
>using indexing tricks might be difficult for sparse matrices, for
>example.
Quote from Gregory Lielens ----------------------
maybe something as (I adopt (*) for matrix product, may the parser do
the same!)
a = b.i(1,2,-1,-2) (*) c.i(4,-2,3,-1)
for
a_ijkl = b_ijmn c_lnkm
------------------------------------- End quote
Is this enough for both outer product and inner product (which is outer and
contract)? Outer product would be like
a = b.i(1,2,3,4) (*) c.i(5,6,7,8)
>They still look acceptable to me, but perhaps [*] etc. is better in
>the end. Indexing expressions are never as long as expressions in
>parentheses.
Yes, [*] looks much better.
Huaiyu
More information about the Python-list
mailing list