Python:numpy command
Import numpy as np Create a matrix: A = np.array([[elements of row1], [element of row2], ... ]) A = np.array([[1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6]]) A = ⎣ ⎡ 1 2 3 2 3 4 3 4 5 4 5 6 ⎦ ⎤ Sub-matrix B = A[[select row], select column] B = A[[0, 2], 1:] B = [ 2 4 3 5 4 6 ]