Numpy In Hindi – NumPy Array Iterating in Hindi

Numpy

Numpy In HindiNumPy Array Iterating in Hindi – Array Iterating Ka Istemal Ham Array Elements Ko One By One Iterating Karne Ke Liye Karte Hai |

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 Iterating in Hindi

Array Iterating Ka Jyadatar Istemal 2-D Array Me Hota Hai, Ise Ham Niche Example Me Dekhe Wale Hai |

Sabse Pahle Ham 1-D Array Me Iterating Karne Wale Hai |

Example:

import numpy as np
arr = np.array([1,2.3])
for x in arr:
  print(x)

Output:

1
2
3

Ab Upper Diye Gaye Output Ko Check Kar Sakte Hai Or Program Ko Understand Kar Sakte Hai |

Read Also – NumPy Array Shape & Array Reshape

Ab Ham 2-D Array Me Iterating Karne Wale Hai , Jiska Niche Example Or Ouput Diya Gaya Hai |

Example 2:

import numpy as np
arr = np.array([[1, 2, 3], [4, 5, 6]])
for x in arr:
  print(x)

Output:

[1 2 3]
[4 5 6]

Example 3:

import numpy as np
arr = np.array([[1,2,3],[4,5,6]])
for x in arr:
  for y in x:
    print(y)

Output:

1
2
3
4
5
6

Ab Ham 3-D Array Me Iterating Karne Wale Hai , Jiska Niche Example Or Ouput Diya Gaya Hai |

Example 4:

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

Output:

[[1 2 3]
 [4 5 6]]
[[ 7  8  9]
 [10 11 12]]

Also Read – NumPy Copy vs View

Example 5:

import numpy as np
arr = np.array([[[1, 2, 3], [4, 5, 6]],[[7,8,9],[10,11,12]]])
for x in arr:
    for y in x:
        for z in y:
            print(z)

Output:

1
2
3
4
5
6
7
8
9
10
11
12

Friends Mujhe Umeed Hai Ki Aapko Python Numpy 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 *