|
|
|
|
|
by ballooney
5136 days ago
|
|
I would add that an advantage of Matlab for number bashing is a much more native handling of linear algebra. Let's say you have two matrices A and B, in matlab I could write: A*B*A'
Whereas in python it would be (approximately): dot(A, dot(B, inverse(A)))
so matlab can evaluate everything in the right order (right to left) whereas for numpy I end up writing a little recursive function to dot a list of arguments together from right to left, which feels a bit cludgey and more of an impediment to getting your ideas down in code. Especially when your equations get very big as they often do with stats! |
|
Numpy has a "matrix" type, so you can write: