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).
