### Navigation

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

# numpy.ma.average

`numpy.ma.``average`(a, axis=None, weights=None, returned=False)

  Average the array over the given axis.

  Parameters: | axis : {None,int}, optional Axis along which to perform the operation. If None, applies to a flattened version of the array. weights : {None, sequence}, optional Sequence of weights. The weights must have the shape of a, or be 1D with length the size of a along the given axis. If no weights are given, weights are assumed to be 1. returned : {False, True}, optional Flag indicating whether a tuple (result, sum of weights/counts) should be returned as output (True), or just the result (False).

### Navigation

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