|
|
|
|
|
by repsilat
2942 days ago
|
|
I know what you mean. In MATLAB [A, B]
concatenates two matrices/vectors, whereas in Python it "wraps" them in an `n+1`-dimensional "matrix".That said, you get most of what you want with libraries. In NumPy you won't write [aRow + bRow for aRow, bRow in zip(aMat, bMat)]
because you'll just call `numpy.concatenate`.Also, Python is mostly not used for mathematical work, and programmers tend to assume matrices are scary or only useful for mathematical work, so it has a "boring" syntax more suited for operating on single items at a time, with lots of loops. |
|