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
|
435 Discussions
|
Please Login in order to post a comment
import numpy N, M, P = list(map(int, input().strip().split()))
arr_1 = numpy.array([input().strip().split()[:P] for _ in range(N)], dtype=numpy.int32) arr_2 = numpy.array([input().strip().split()[:P] for _ in range(M)], dtype=numpy.int32) print(numpy.concatenate((arr_1, arr_2)))
import numpy N, M, P = list(map(int, input().split())) out_arr = [] for _ in range(N+M): row = numpy.array(list(map(int, input().split()))[:P]) out_arr.append(row) print(numpy.concatenate([out_arr], axis = 1))
import numpy as np
n, m, p = map(int, input().strip().split())
arr_1 = np.array([input().strip().split() for _ in range(n)], dtype=np.int32) arr_2 = np.array([input().strip().split() for _ in range(m)], dtype=np.int32)
print(np.concatenate((arr_1, arr_2), axis=0))
import numpy as np n,m,p = input().split() arr1 = [] arr2 = [] for i in range(int(n)): narr = list(map(int, input().split())) arr1.append(narr) for j in range(int(m)): marr = list(map(int, input().split())) arr2.append(marr)
arr1 = np.array(arr1) arr2 = np.array(arr2) print(np.concatenate((arr1, arr2)))