Hi,
of course I can and did, but it is not intuitive and a surprise that
sever kicks in only when using slice  and not when using a whole piddle.

Ingo

On 08/26/2016 12:43 PM, vividsnow wrote:
> Hi
>
> You should use "copy" in this case.
>
> https://metacpan.org/pod/PDL::Core#sever
> https://metacpan.org/pod/PDL::Core#copy
>
> On 08/26/2016 01:23 PM, Ingo Schmid wrote:
>> Hi,
>>
>> I got this unexpected behaviour recently: I think it is a bug. If it is,
>> it is very serious, I would say.
>> v2.016.
>>
>> Ingo
>>
>> pdl> $a=rvals(5,5)
>>
>> pdl> $b=$a->sever
>>
>> pdl> p $a
>>
>> [
>>  [ 2.8284271   2.236068          2   2.236068  2.8284271]
>>  [  2.236068  1.4142136          1  1.4142136   2.236068]
>>  [         2          1          0          1          2]
>>  [  2.236068  1.4142136          1  1.4142136   2.236068]
>>  [ 2.8284271   2.236068          2   2.236068  2.8284271]
>> ]
>>  
>>
>> pdl> p $b
>>
>> [
>>  [ 2.8284271   2.236068          2   2.236068  2.8284271]
>>  [  2.236068  1.4142136          1  1.4142136   2.236068]
>>  [         2          1          0          1          2]
>>  [  2.236068  1.4142136          1  1.4142136   2.236068]
>>  [ 2.8284271   2.236068          2   2.236068  2.8284271]
>> ]
>>  
>>
>> pdl> $b(0,).=100
>>
>> pdl> p $b
>>
>> [
>>  [       100   2.236068          2   2.236068  2.8284271]
>>  [       100  1.4142136          1  1.4142136   2.236068]
>>  [       100          1          0          1          2]
>>  [       100  1.4142136          1  1.4142136   2.236068]
>>  [       100   2.236068          2   2.236068  2.8284271]
>> ]
>>  
>>
>> pdl> p $a
>>
>> [
>>  [       100   2.236068          2   2.236068  2.8284271]
>>  [       100  1.4142136          1  1.4142136   2.236068]
>>  [       100          1          0          1          2]
>>  [       100  1.4142136          1  1.4142136   2.236068]
>>  [       100   2.236068          2   2.236068  2.8284271]
>> ]
>>  
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> pdl-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pdl-general
>>
> ------------------------------------------------------------------------------
> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general



------------------------------------------------------------------------------
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to