Holy cow, Chris, I'd forgotten about indadd().  Nicely done.

On Jul 1, 2009, at 9:57 PM, Chris Marshall wrote:

> Does this do what you want?
>
> perldl> $this=pdl(3,4,5,5,5,5,5,5,5,5)
>
> perldl> p $this
> [3 4 5 5 5 5 5 5 5 5]
> perldl> $that = sequence(11)
>
> perldl> p $this
> [3 4 5 5 5 5 5 5 5 5]
> perldl> p $that
> [0 1 2 3 4 5 6 7 8 9 10]
> perldl> indadd($this->ones,$this,$that)
>
> perldl> p $that
> [0 1 2 4 5 13 6 7 8 9 10]
>
> Hyer, Dr. Edward wrote:
>> Hi PDL Wizards,
>>
>> perldl> $this=pdl(3,4,5,5,5,5,5,5,5,5)
>> perldl> $that=pdl(0..10)
>> perldl> $thisi=index($that,$this)
>> perldl> $thisi += 1
>> perldl> p $that
>> [0 1 2 4 5 6 6 7 8 9 10]
>>
>> I was hoping for
>> [0 1 2 4 5 13 6 7 8 9 10]
>>
>> Any suggestions for how I get this result?
>>
>> Thanks,
>>
>> --Edward H.
>>
>
> _______________________________________________
> 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