The “sever" severs $a from its flow affiliates (if any), returning the severed child ($a).
You seem to be expecting “sever” to act like “copy”. That is an API wart, and may need improvement in the documentation. It is specifically called out in the current “sever” documentation, but may not be prominent enough. If you’d said: $a = rvals(5,5) $b = $a->(:,:); $c = $b->sever; $c->(0) .= 100; then $a would be unchanged (although $b would be changed). > On Aug 26, 2016, at 4:23 AM, Ingo Schmid <[email protected]> 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
