cf.Data.integral¶

Data.
integral
(axes=None, squeeze=False, mtol=1, weights=None, inplace=False, _preserve_partitions=False)[source]¶ TODO
TODO if no weights => sum
Parameters:  axes: (sequence of) int, optional
The axes to be collapsed. By default flattened input is used. Each axis is identified by its integer position. No axes are collapsed if axes is an empty sequence.
 squeeze:
bool
, optional If True then collapsed axes are removed. By default the axes which are collapsed are left in the result as axes with size 1, meaning that the result is guaranteed to broadcast correctly against the original array.
 weights: datalike or dict, optional
TODO note that the units of the weights matter
Weights associated with values of the array. By default all nonmissing elements of the array are assumed to have a weight equal to one. If weights is a datalike object then it must have either the same shape as the array or, if that is not the case, the same shape as the axes being collapsed. If weights is a dictionary then each key is axes of the array (an int or tuple of ints) with a corresponding datalike value of weights for those axes. In this case, the implied weights array is the outer product of the dictionary’s values.
 Parameter example:
If
weights={1: w, (2, 0): x}
thenw
must contain 1dimensionsal weights for axis 1 andx
must contain 2dimensionsal weights for axes 2 and 0. This is equivalent, for example, toweights={(1, 2, 0), y}
, wherey
is the outer product ofw
andx
. Ifaxes=[1, 2, 0]
thenweights={(1, 2, 0), y}
is equivalent toweights=y
. Ifaxes=None
and the array is 3dimensionsal thenweights={(1, 2, 0), y}
is equivalent toweights=y.transpose([2, 0, 1])
.
mtol: number, optional
Returns: Examples:
TODO