Let sample Z be the zip of two samples X and Y. It is guaranteed that the order in which Z traverses the elements of X is monotonic. Not strict monotonic, however: if the points p of some element i of X are divided over n >= 2 elements of Y, then element i is evaluated n times, each with a different subset s_j of points p and weights w. If the subsets (s_j)_j are consecutive slices, max(s_j) < min(s_{j+1}), then everything works fine. If not, for the j-th evaluation of element i points p[s_j] is used together with weights w[t_j] instead of w[s_j], where (t_j)_j is a sequence of consecutive slices such that the sizes of the subsets s_j and t_j are equal. This patch fixes this problem and adds a test for this situation.
Let sample
Z
be the zip of two samplesX
andY
. It is guaranteed that the order in whichZ
traverses the elements ofX
is monotonic. Not strict monotonic, however: if the pointsp
of some elementi
ofX
are divided overn >= 2
elements ofY
, then elementi
is evaluatedn
times, each with a different subsets_j
of pointsp
and weightsw
. If the subsets(s_j)_j
are consecutive slices,max(s_j) < min(s_{j+1})
, then everything works fine. If not, for thej
-th evaluation of elementi
pointsp[s_j]
is used together with weightsw[t_j]
instead ofw[s_j]
, where(t_j)_j
is a sequence of consecutive slices such that the sizes of the subsetss_j
andt_j
are equal. This patch fixes this problem and adds a test for this situation.Fixes #791