matrix in numpy code example
Example 1: numpy matrix
>>> np.array([[1, 2], [3, 4]])
array([[1, 2],
[3, 4]])
#np.matrix is no longer recommended!
Example 2: numpy matrix in python 3
np.matrix([[1, 2], [3, 4]])
# matrix([[1, 2],
# [3, 4]])