[python] How can I find the dimensions of a matrix in Python?