# Numpy In Hindi – NumPy Array Join In Hindi

Numpy In HindiNumPy Array Join In Hindi – Array Joining Ka Istemal Array Ko Concatenate Yani Jodne Ke Liye Kiya Jata 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 Join In Hindi

Contents

Numpy Array Ko Join Karne Ke Liye Axis 0 And 1 Ka Istemal Kiya Jata Hai, Jaisa Ki Aap Niche Image Me Dekh Rahe Hai |

Ab Ham Numpy Array Ko Join Karte Hai, And Join Karne Ke Liye concatenate() Function Ka Istemal karte Hai |

concatenate() Function Ko Axis De Bhi Sakte Hai, Nhi To concatenate() Function By Default 0 Axis Me Join Kar Deta Hai |

Example 1:

```import numpy as np
n1 = np.array([1,2,3,4])
n2 = np.array([5,6,7,8])

arr = np.concatenate((n1,n2))
print(arr)```

Output:

`[1 2 3 4 5 6 7 8]`

Example 2:

```import numpy as np
n1 = np.array([[1,2],[3,4]])
n2 = np.array([[5,6],[7,8]])

arr_axis0 = np.concatenate((n1,n2), axis=0)
print(arr_axis0)

print("-------------------------------------------")

arr_axis1 = np.concatenate((n1,n2), axis=1)
print(arr_axis1)```

Output:

```[[1 2]
[3 4]
[5 6]
[7 8]]
-------------------------------------------
[[1 2 5 6]
[3 4 7 8]]```

### Joining Arrays Using Stack Functions In Hindi

Arrays Ko Stack Functions Se Bhi Join Kiya Ja Sakta Hai, Stack Functions Same concatenate Function Jaisa Hai, Stack Functions Ko Bhi Axis Deni Hoti Hai, Nhi To Stack() Function By Default 0 Axis Me Join Kar Deta Hai |

Read More – NumPy Array Iterating

Example 1:

```import numpy as np
n1 = np.array([1,2,3,4])
n2 = np.array([5,6,7,8])

arr = np.stack((n1,n2))
print(arr)```

Output:

```[[1 2 3 4]
[5 6 7 8]]```

Example 2:

```import numpy as np
n1 = np.array([[1,2],[3,4]])
n2 = np.array([[5,6],[7,8]])

arr = np.stack((n1,n2), axis=0)
print(arr)

print("-------------------------------------")
arr = np.stack((n1,n2), axis=1)
print(arr)```

Output:

```[[[1 2]
[3 4]]

[[5 6]
[7 8]]]
-------------------------------------
[[[1 2]
[5 6]]

[[3 4]
[7 8]]]```

### Numpy hstack Functions In Hindi

hstack Function Ka Istemal Karke Horizontal Yani Ki Rows Me Join Kiya Jata Hai |

Read More – NumPy Array Shape And Array Reshape

Example:

```import numpy as np
n1 = np.array([1,2,3,4])
n2 = np.array([5,6,7,8])

arr = np.hstack((n1,n2))
print(arr)```

Output:

`[1 2 3 4 5 6 7 8]`

### Numpy vstack Functions In Hindi

vstack Function Ka Istemal Karke Vertical Yani Ki Columns Me Join Kiya Jata Hai |

Example:

```import numpy as np
n1 = np.array([1,2,3,4])
n2 = np.array([5,6,7,8])

arr = np.vstack((n1,n2))
print(arr)```

Output:

```[[1 2 3 4]
[5 6 7 8]]```

### Numpy dstack Functions In Hindi

dstack Function Ka Istemal Karke Height Yani Ki depth Me Join Kiya Jata Hai |

Example:

```import numpy as np
n1 = np.array([1,2,3,4])
n2 = np.array([5,6,7,8])

arr = np.dstack((n1,n2))
print(arr)```

Output:

```[[[1 5]
[2 6]
[3 7]
[4 8]]]```

Read More – Create Numpy Arrays Using Functions