matrix.squeeze() method we can compress the size of the matrix using the same method. But remember one thing: we are using this method on a matrix of Nx1 size, which is returned as a 1xN matrix.
Return: Return a squeezed matrix
Example # 1:
In this example, we can compress the size of the given matrix using
matrix.squeeze () .
Output: p >
Example # 2:
[[4 1 9] [12 3 1] [4 5 6]]