good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Counting PDL vectors in a PDL matrixby mxb (Pilgrim) |
on Feb 21, 2018 at 15:25 UTC ( [id://1209666]=note: print w/replies, xml ) | Need Help?? |
Hi, Thanks for the quick replies all. Thanks to choroba for linking to uniqvec, which I must have missed during reading the documentation. Thanks to vr for the good example code, this clears things up a bit. I came to the conclusion that my whole approach was incorrect (which I kind of expected when learning PDL). I am building up the matrix vector by vector, so if we consider each vector as a single entity (which is what I am doing), then rather than a 2D matrix of vectors, in essence I have a 1D vectors of entities. Therefore, I am choosing to build the lookup table during creation. Many thanks all.
In Section
Seekers of Perl Wisdom
|
|