Dimension and Reshaping

What is the dimension ?

In [95]:

print ('shape : ', x2n3.shape)
print (x2n3)
shape :  (3, 5)
[['1' '2' '3' '4' '5']
 ['11' '12' '13' '14' '15']
 ['21' '22' '23' '24' '25']]

Change Dimension

In [96]:

print ('reshape to 5x3 : \n',x2n3.reshape(5,3))
reshape to 5x3 : 
 [['1' '2' '3']
 ['4' '5' '11']
 ['12' '13' '14']
 ['15' '21' '22']
 ['23' '24' '25']]

results matching ""

    No results matching ""