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
|
432 Discussions
|
Please Login in order to post a comment
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)))
import numpy as np r1,r2,c =map(int,input().split()) lt=[] for i in range(r1): l =list(map(int,input().split())) lt.append(l) ll=[] for m in range(r2): l2 =list(map(int,input().split())) ll.append(l2) lt1=np.array(lt,dtype=int) ll1=np.array(ll,dtype=int)
print (np.concatenate((lt1, ll1)) )
Enter your code here. Read input from STDIN. Print output to STDOUT
import numpy as np a=input().strip().split() n=int(a[0]) m=int(a[1]) p=int(a[2]) b=n+m arr=[] for _ in range(b): rows=list(map(int,input().strip().split())) arr.append(rows)
c=np.array(arr) print (c) 1.