in reply to Re: Translating python math to Perl
in thread Translating python math to Perl

Did a quick search and found that the '@' operator is matrix multiplication.

So that line points @ matrix.T is multiplying the matrix 'points' by the transpose of 'matrix'.

I'd say this really should be translated to PDL, because otherwise it's going to get very verbose. That's the real reason people use matrices in linear algebra - it is just too much fiddly math otherwise, and it's all fairly repetitive. Mathmaticians created "matrix math" just to simplify the notation for these common formulas. Unfortunately I don't know PDL so I can't help there.

Replies are listed 'Best First'.
Re^3: Translating python math to Perl
by bliako (Abbot) on Aug 29, 2023 at 07:20 UTC

    Jeez! my search was talking about overwriting methods.Talk of the snake with the forked tongue. I will update my answer.