Thank you!! It certainly worked. Just to make sure I understand it
correctly,

On Mon, Apr 20, 2009 at 11:46 AM, Craig DeForest
<[email protected]>wrote:

>        perldl> $a = random 10,5;
>        perldl> $b = sequence 10,2;
>        perldl> $b0 = $b->dummy(1,1);
>        perldl> $c = $a->inner($b0);
>        perldl> help $c
>        This variable is Double D[5,2]              P                0.08Kb
>
> This time, inner's arguments have dimensionalities of (5,5) and (5,1,2)
> respectively.


you mean (10,5) and (10,1,2) in the example, right?

The active dims match (they have size 5),


active dims match at size 10, right?


> and the thread dims can be promoted to match: $a's (5) gets automatically
> promoted to (5,1), so that it has the same dimensionality as $b0's (1,2).
>  The threading engine sees thread sizes of (5,1) and (1,2) and can match
> them, so you get a (5,2) output.


(very tentatively) all correct here??


Thanks!
Maggie


>
> On Apr 20, 2009, at 9:00 AM, Maggie J. Xiong wrote:
>
>  Hi,
>>
>> I'm learning to work with PP (yeah!). I have a correlation function that
>> has a signature like "inner" Signature: (a(n); b(n); [o]c()). Both my
>> function and "inner" threads correctly if one of the pdl is 1D (or with
>> empty extra dim), but fails (as per my intention) when both pdls are 2D. For
>> instance here, my intent is to get back a 5 x 2 matix, but
>>
>> perldl> $a = random 10, 5
>>
>> perldl> $b = sequence 10, 2
>>
>> perldl> p $a->inner($b)
>> PDL: PDL::Primitive::inner(a,b,c): Parameter 'b'
>> PDL: Mismatched implicit thread dimension 0: should be 5, is 2
>>
>> Caught at file (eval 97), line 4, pkg main
>>
>> perldl> p $a->inner($b( ,0))
>> [ 27.700621  22.191472  19.461998  27.395397  27.038342]
>>
>>
>> Is there an easy way to make it thread thru the 1st pdl, then thread thru
>> the 2nd pdl?
>>
>>
>> Thanks,
>> Maggie
>> _______________________________________________
>> Perldl mailing list
>> [email protected]
>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>>
>
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to