difference between numpy and array code example
Example 1: difference between numpy array and matrix
import numpy as np
a = np.array([[4, 3], [2, 1]])
b = np.array([[1, 2], [3, 4]])
print(a@b)
# [[13 20]
# [ 5 8]]
Example 2: numpy difference between two arrays
import numpy as np
result = np.subtract([1.1, 2.2, 3.3], [1, 2, 3])