With the help of
Numpy matrix.reshape() method, we are able to reshape the shape of the given matrix. Remember all elements should be covered after reshaping the given matrix.
Return: new reshapped matrix
Example #1 :
In the given example we are able to reshape the given matrix by using
[[64 1 12 3]]
Example #2 :
[[1 2 4] [5 7 8]]
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.