With the help of
Numpy matrix.resize() method, we are able to resize the shape of the given matrix. Remember all elements should be covered after resizing the given matrix.
Return: new resized matrix
Example #1 :
In the given example we are able to resize 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.