Internal helper for sizeIntegral(). Replicates x along the dimensions it
does not have and permutes its dimensions into the order given by
target_labels, so that arrays with different dimensions can be multiplied
together elementwise.
broadcast_dims(x, labels, target_labels, extent)An array with dimensions extent[target_labels].
An array, vector or scalar.
The dimension labels of x.
The dimension labels of the result. Must contain all of
labels.
A named vector giving the extent of each label.