Concatenate

Sort by

recency

|

428 Discussions

|

  • + 0 comments
    import numpy as n
    NM=[*map(int, input().split()[:2])]
    A,B=[n.array([[*map(int, input().split())]for _ in range(NM[i])]) for i in range(2)]
    print(n.concatenate((A, B),axis=0))
    
  • + 0 comments
    import numpy
    
    n, m, _ = map(int, input().split())
    a1 = numpy.vstack([list(map(int, input().split())) for _ in range(n)])
    a2 = numpy.vstack([list(map(int, input().split())) for _ in range(m)])
    print(numpy.concatenate((a1, a2), axis=0))
    
  • + 0 comments

    mport numpy as np

    n, m, p = map(int, input().split())

    y1 = np.array([input().split() for _ in range(n)], int) y2 = np.array([input().split() for _ in range(m)], int)

    cat = np.concatenate((y1,y2), axis = 0)

    print(cat)

  • + 0 comments

    import numpy as np n,m,p=map(int,input().split()) ar1=np.array([list(map(int,input().split())) for i in range(n)]) ar2=np.array([list(map(int,input().split())) for j in range(m)]) print(np.concatenate((ar1,ar2)))

  • + 0 comments
    import numpy
    
    n, m, p = list(map(int, input().split()))
    
    ls = list()
    
    for i in range(n+m):
        ls.append(list(map(int, input().split())))
    
    arr = numpy.array(ls)
    print(arr)