On Sun, Jun 20, 2010 at 11:46 AM, Daniel Carrera <[email protected]> wrote:
> $a = sequence 10;
> $b = $a->dummy * ones(4);


Hmmm... not really

perldl> $a = sequence 5
perldl> p $a
[0 1 2 3 4]
perldl> $b = $a->dummy * ones(4)
perldl> p $b
[
 [0 0 0 0]
 [1 1 1 1]
 [2 2 2 2]
 [3 3 3 3]
 [4 4 4 4]
]

I was really expecting
[
 [0 1 2 3 4]
 [0 1 2 3 4]
 [0 1 2 3 4]
 [0 1 2 3 4]
]

Maybe it is just a transposition problem.


> $c = $b->dummy * ones(4);

That gets even further away from what I was expecting. I got

[
 [
  [0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
 ]
 [
  [1 1 1 1]
  [1 1 1 1]
  [1 1 1 1]
  [1 1 1 1]
 ]
.. snipped ..

I was expecting

[
 [
  [0 1 2 3 4]
  [0 1 2 3 4]
  [0 1 2 3 4]
  [0 1 2 3 4]
 ]
 [
  [0 1 2 3 4]
  [0 1 2 3 4]
  [0 1 2 3 4]
  [0 1 2 3 4]
 ]
 [
  [0 1 2 3 4]
  [0 1 2 3 4]
  [0 1 2 3 4]
  [0 1 2 3 4]
 ]
.. snipped ..
]

>
> Cheers,
> Daniel.
>
> On Sun, Jun 20, 2010 at 6:31 PM, P Kishor <[email protected]> wrote:
>> for testing purpose, I want to quickly create a large piddle from
>> piddles. So, given
>>
>>    $a = sequence 10;
>>
>> I want to create
>>
>>    $b = pdl $a, $a, $a ...
>>    $c = pdl $b, $b, $b ...
>>
>> That is
>>
>>    $c = [
>>                [$a $a $a $a]
>>                [$a $a $a $a]
>>                [$a $a $a $a]
>>           ]
>>
>> I am looking for something like
>>
>>    $b = pdl $a x n
>>
>> where 'x' behaves like 'x' in Perl, not like it does so currently in
>> PDL. Is there something like this?
>>
>>
>>
>> --
>> Puneet Kishor http://www.punkish.org
>> Carbon Model http://carbonmodel.org
>> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
>> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
>> Nelson Institute, UW-Madison http://www.nelson.wisc.edu
>> -----------------------------------------------------------------------
>> Assertions are politics; backing up assertions with evidence is science
>> =======================================================================
>>
>> _______________________________________________
>> Perldl mailing list
>> [email protected]
>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>>
>
>
>
> --
> No trees were killed in the generation of this message. A large number
> of electrons were, however, severely inconvenienced.
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to