소스 뷰어
조회수 :   1
import numpy as np

a = np.arange(1, 25).reshape(2, 3, 4)
b = np.arange(1, 13).reshape(2, 3, 2)
c = np.concatenate( (a, b ), axis=2 )

print( "a = ", a, sep="\n" )
print( "-"*60  ) 
print( "a.shape = ", a.shape )
print( "-"*60  ) 

print( "b = ", b, sep="\n" )
print( "-"*60  ) 
print( "b.shape = ", b.shape )
print( "-"*60  ) 

print( "c = ", c, sep="\n" )
print( "-"*60  ) 
print( "c.shape = ", c.shape )
print( "-"*60  ) 
a = 
[[[ 1  2  3  4]
  [ 5  6  7  8]
  [ 9 10 11 12]]

 [[13 14 15 16]
  [17 18 19 20]
  [21 22 23 24]]]
------------------------------------------------------------
a.shape =  (2, 3, 4)
------------------------------------------------------------
b = 
[[[ 1  2]
  [ 3  4]
  [ 5  6]]

 [[ 7  8]
  [ 9 10]
  [11 12]]]
------------------------------------------------------------
b.shape =  (2, 3, 2)
------------------------------------------------------------
c = 
[[[ 1  2  3  4  1  2]
  [ 5  6  7  8  3  4]
  [ 9 10 11 12  5  6]]

 [[13 14 15 16  7  8]
  [17 18 19 20  9 10]
  [21 22 23 24 11 12]]]
------------------------------------------------------------
c.shape =  (2, 3, 6)
------------------------------------------------------------