We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Concatenate
- Discussions
Concatenate
Concatenate
Sort by
recency
|
449 Discussions
|
Please Login in order to post a comment
import numpy as np
n, m, p = list(map(int, input().split())) l1 = [] l2 = [] for i in range(n): l1.append(list(map(int,input().split()))) for j in range(m): l2.append(list(map(int,input().split()))) arr1 = np.array(l1) arr2 = np.array(l2) print(np.concatenate((arr1, arr2), axis=0))
import numpy as np
N = input()
l1 = list(map(int,N.split(' ')))
main_list1 = [] main_list2 = [] for i in range(l1[0]): M = input() l2 = list(map(int,M.split(' '))) main_list1.append(l2)
for i in range(l1[1]): P = input() l3 = list(map(int,P.split(' '))) main_list2.append(l3)
main_list1 = np.array(main_list1) main_list2 = np.array(main_list2)
print(np.concatenate((main_list1,main_list2)))
` import numpy
N,M,P = map(int,input().split(" ")) arr1 = [] for i in range(N + M): arr1.append(numpy.array(input().split()).astype(int))
print(numpy.array(arr1)) `