When using matrix in numpy, I want to change the value of one element in a matrix using the index, but the result I got is strange.
How can I change one value in indexing method?
arr = np.array([[1, 2, 3, 4], [5, 6, 7, 8]])
mat1 = np.mat(arr)
mat1[1][0] = 3
print(arr)
[[1 2 3 4]
[3 3 3 3]]