numpy create matrix code example
Example 1: how to import numpy array in python
>>> import numpy as np
>>> a = np.array([0, 1, 2, 3])
>>> a
array([0, 1, 2, 3])
Example 2: numpy matrix in python 3
np.matrix([[1, 2], [3, 4]])
# matrix([[1, 2],
# [3, 4]])
Example 3: making a numpy matrix
np.matrix([[1, 2], [3, 4]])