matrix-comparison: translating linear algebra between languages
brianchevalier.github.io/matrix-compare/Posted Nov 29, 2020, 3:13 AM UTC
234
Posted Nov 29, 2020, 3:13 AM UTC
Kind of weird how eye is apparently the shorthand for an identity matrix in Matlab and Numpy. It's seems unnecessarily idiosyncratic the way car/cdr is in the other Lisps, but perhaps it has a long tradition being called that by mathematicians too?
Mathematicians typically call the identity matrix 'I' (i.e. capitial i). My guess is that the Matlab authors wanted to avoid a single-character name for the matrix so they used a homophone to avoid this. Pretty sure Numpy just picked it up from Matlab.
This is a really cool project I found on how to use different matrix libraries in various languages.
FYI Languages used in the comparisons: