Thanks a lot for sharing the code.
It does indeed make it order of magnitude easier for me to understand and validate my own theory and assumptions about it.
For context when I was like 6 years old I was writing code in BASIC on a “TRS-80 Model III” to do linear algebra for fun (trying to make an arcade game).
But never learned algebra until I was forced to at ~20 years old in university.
So my understanding of mathematics was always mechanical (algorithm) and never very abstract.
And it always was extremely hard to read research paper because the Greek letter don’t even mean the same thing in a (Statistic/ machine learning) paper and in a (physics/ calculus paper). And the author never properly define all the function and variables and assume you are already an expert.