Important Notice:

Course Content
NumPy Basic in Python (Chapter-13) M3-R5
About Lesson

Indexing of 2 dimensional array:-

 

  • indexing/slicing using double bracket notation

[0][0]

[0][1]

[0][2]

[1][0]

[1][1]

[1][2]

[2][0]

[2][1]

[2][2]

 

  • indexing/slicing using single bracket notation

[0,0]

[0,1]

[0,2]

[1,0]

[1,1]

[1,2]

[2,0]

[2,1]

[2,2]

 

#indexing 2D Array

import numpy as np

a=np.array([[10,20,30],[40,50,60],[70,80,90]])

print(a)

print(a[0,0])

print(a[1,0])

print(a[2,2])

 

error: Content is protected !!