### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Masked array operations »

# numpy.ma.squeeze

`numpy.ma.``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 |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Masked array operations »