Reshape a NumPy Array

Reshape a NumPy Array

Instructor-svg Al-Mamun Sarkar
Mar 31 , 2020

Reshape a NumPy Array. The following shows how to reshape a NumPy Array of the Python NumPy module. 

 

Code:

a.reshape(6,2)

Output:

array([[ 9.,  9.],
       [ 6.,  5.],
       [ 5.,  5.],
       [ 3.,  5.],
       [ 3.,  0.],
       [ 1.,  2.]])

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram