numpy matrix library python 3 code example Example: numpy matrix in python 3 Click to copynp.matrix([[1, 2], [3, 4]]) # matrix([[1, 2], # [3, 4]])