Parameter Name: axis
Description : int or tuple of int
The parameter selects a subset of the single-dimensional entries in the shape. If an axis is being selected with a shape entry greater than one, an error is being raised.
Return : The input array, but with a subset of the dimensions of length 1 removed. This is always itself or a view into array.
The first step would be to give syntax
import numpy as np
x = np.arange(25).reshape(1,5,5)
print ('Array X:')
print( x )
y = np.squeeze(x)
print ('Array Y:')
print ('The shapes of X and Y array:')
print (x.shape, y.shape)