a = np.array([[1,2,3,4,5,6,7],[8,9,10,11,12,13,14]])
a[1, 5]
for finding with index
a[1, 5]
for finding with index
a[0, 1:6:2] means first row start from 1 end in 6 index stepping with 2
a[:, 2] = [1, 2]
which means from all row first and second argument should be 1 , 2
which means from all row first and second argument should be 1 , 2
output = np.ones((5,5))
z = np.zeros((3.3))
z[1,1] = 9
output[1:4, 1:4] = z
z = np.zeros((3.3))
z[1,1] = 9
output[1:4, 1:4] = z
when copying be careful even though you assign in new variable it changes