Concatenate

Sort by

recency

|

449 Discussions

|

  • + 0 comments

    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))

  • + 0 comments

    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)))

  • + 0 comments

    ` 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)) `

  • + 0 comments
    import numpy as np
    
    N, M, P = map(int, input().split(" "))
    print(np.array([list(map(int, input().split())) for _ in range(N+M)]))
    
  • + 0 comments
    import numpy
    
    n,m,p = map(int, input().split())
      
    print(numpy.concatenate(([list(map(int, input().split())) for i in range(n)], [list(map(int, input().split())) for i in range(m)]), axis = 0))