소스 뷰어
import numpy as np
a = np.arange( 1, 7 )
print( "a =", a )
print( "a.shape =", a.shape )
print( "-"*30 )
b = a.reshape( 1, -1 )
print( "b = a.reshape( 1, -1 ) =", b, sep="\n" )
print( "b.shape =", b.shape )
print( "-"*30 )
c = a.reshape( -1, 1 )
print( "a.reshape( -1, 1 )", c, sep="\n" )
print( "c.shape =", c.shape )
print( "-"*30 )
d = a.reshape( 2,3 )
print( "d = a.reshape( 2,3 )", d, sep="\n" )
print( "d.shape =", d.shape )