### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Array manipulation routines »

# numpy.squeeze

`numpy.``squeeze`(a)

  Remove single-dimensional entries from the shape of an array.

  Parameters: | a : array_like Input data.
  Returns: | squeezed : ndarray The input array, but with with all dimensions of length 1 removed. Whenever possible, a view on a is returned.

  Examples

      >>> x = np.array([[[0], [1], [2]]])
      >>> x.shape
      (1, 3, 1)
      >>> np.squeeze(x).shape
      (3,)

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Array manipulation routines »