join two numpy 2d array
import numpy as np
a = np.array([[0, 1, 3], [5, 7, 9]])
b = np.array([[0, 2, 4], [6, 8, 10]])
c = np.concatenate((a, b), axis=0)
print(c)
Output :
[[ 0 1 3]
[ 5 7 9]
[ 0 2 4]
[ 6 8 10]]
join two numpy 2d array
import numpy as np
a = np.array([[0, 1, 3], [5, 7, 9]])
b = np.array([[0, 2, 4], [6, 8, 10]])
c = np.concatenate((a, b), axis=0)
print(c)
Output :
[[ 0 1 3]
[ 5 7 9]
[ 0 2 4]
[ 6 8 10]]
how to add elements in 2d array in python
n,m=int(input()),int(input())
for i in range(0,n):
for j in range(0,m):
a[i].append(int(input()))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us