Syntactic Confectionery Delight | |
PerlMonks |
first stumbling steps in PDLby Discipulus (Canon) |
on Dec 15, 2022 at 11:54 UTC ( [id://11148889]=perlquestion: print w/replies, xml ) | Need Help?? |
Discipulus has asked for the wisdom of the Perl Monks concerning the following question:
Dear ones, Inspired by this post and by the underlying forest problem I had the genial ( grin ;) idea of just making the check horizontally and then repeat it on a rotated by 90° AoA. Rotating the AoA lead me to PDL and here troubles and stumbling started. Firstly because once something is a piddle I cannot anymore use it as a comfortable perl datastrucure: if my piddle is a 2d array and I take a slice of it, a row, then I cannot use it as an array: @{ $x->slice('0,') } gives a nasty not an array reference error. But I insisted and now I have the following code:
In the meanwhile his Anonymousness posted a PDL solution to the problem, code I dont understand at all. Can someone be so kind to guide me expanding my own solution? If such is possible I'd like it explained plainly, just to let me understanding PDL a bit more. As side note I have found PDL QuickRef but I suspect some syntax has changed in PDL since then (would be nice to have an updated version of this ;) and this tutorial Thanks for reading L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Back to
Seekers of Perl Wisdom
|
|