### Navigation

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

# numpy.ma.MaskedArray.flatten

`MaskedArray.``flatten`(order='C')

  Collapse an array into one dimension.

  Parameters: | order : {‘C’, ‘F’}, optional Whether to flatten in C (row-major) or Fortran (column-major) order. The default is ‘C’.
  Returns: | y : ndarray A copy of the input array, flattened to one dimension.

  Examples

      >>> a = np.array([[1,2], [3,4]])
      >>> a.flatten()
      array([1, 2, 3, 4])
      >>> a.flatten('F')
      array([1, 3, 2, 4])

### Navigation

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