How can I get data from a specific row and column range?
For example, I have a 5X5 array. I would like to get data in row 1~3 and column 1~3?
I know there are other answers talking about getting data in columns, but I don't want the whole columns. Need help~
This is the coding I use to get the whole column.
import numpy as np
m = np.array(np.random.random((5, 5)))
print(m)
#Getting column 1,2
print(m[:,[1, 2]])
#Getting column 1~3
print(m[:,1:4])