ndarray.squeeze

ndarray.squeeze(self, axis=None)

Remove single-dimensional entries from the shape of a.