Numpy Array Indexing

NumPy Array Indexing – Numpy In Hindi

Numpy

NumPy Array Indexing – Numpy In Hindi – Array Indexing Karne Ke Liye Hame Keval Index Number Dena Hota Hai And Indexing 0 Se Start Hoti Hai |

What Is Indexing – Indexing Keval List Ya Array Me Se Kisi Ek Particular Number Ko Access Karne Ke Liye Istemal Hoti Hai Or Ham Ise Hi Indexing Kahte Hai |

NumPy Array Indexing in Hindi

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

Numpy Array Me Index 0 Se start Hota Hai Or Numpy Me Ham Indexing 1-D Array Or 2-D Array And 3-D Array Me Kar Sakte Hain. Inhe Ham Example Ke Sath Dekhte Hai |

1-D Array Indexing In Hindi

Example 1:

Ham 1-D Array Me Third Element Access Kar Rahe Hai.

import numpy as np
arr = np.array([1,2,3,4])
print(arr[2])

Output:

3

Example 2:

Ab Ham Indexing Ke Sath Two Elements Ko Add Karne Wale Hain |

import numpy as np
arr = np.array([1,2,3,4])
print(arr[2] + arr[3])

Output:

7

Also ReadCreate Numpy Arrays Using Functions

2-D Array Indexing In Hindi

2-D Array Ke Sath Indexing Karne ke Liye Sabse Pahle Aapko Row, Column Dena Hota Hai |

Example 1:

import numpy as np
arr = np.array([[1,2,3,4,5], [6,7,8,9,10]])
print('2nd element on 1st List: ', arr[0, 1])

Output:

2nd element on 1st List:  2

Example 2:

import numpy as np
arr = np.array([[1,2,3,4,5], [6,7,8,9,10]])
print('2nd element on 1st List: ', arr[1, 3])

Output:

4th element on 2nd List:  9

3-D Array Indexing In Hindi

Example:

import numpy as np
arr = np.array([[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]])
print(arr[0, 1, 1])

Output:

5

arr[0, 1, 1] prints the value 5.

Also Read – NumPy – Environment + Setup + Anaconda

Friends Mujhe Umeed Hai Ki Aapko Numpy Arrays Indexing in Hindi Ke Bare Mai 100% Jankari Ho Gayi Hogi | Agar Aapko Learn Karne Main Dikkat Aa Rahi Hai To Aap Mere Se Contact Kar Sakte Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *