You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests with a which index that is randomly drawn. However, the way they draw it, risks returning which = 0, which is out of range. It's just by luck from how the initial random seed is set that this is not happening in the current tests.
Action
Replace probs <- runif(1); which <- round(probs * max) with a better strategy that guarantees that which is in [1,max].
The text was updated successfully, but these errors were encountered:
Adopted from an off-line report by @AngelPn:
Issue
Test script https://github.com/HenrikBengtsson/matrixStats/blob/develop/tests/rowOrderStats.R:
matrixStats/tests/rowOrderStats.R
Lines 50 to 54 in 2ef2ab0
and test script https://github.com/HenrikBengtsson/matrixStats/blob/2ef2ab0a308ecc07bf7419ea18ac163df6219d17/tests/rowOrderStats_subset.R:
matrixStats/tests/rowOrderStats_subset.R
Lines 21 to 27 in 2ef2ab0
tests with a
which
index that is randomly drawn. However, the way they draw it, risks returningwhich = 0
, which is out of range. It's just by luck from how the initial random seed is set that this is not happening in the current tests.Action
probs <- runif(1); which <- round(probs * max)
with a better strategy that guarantees thatwhich
is in [1,max].The text was updated successfully, but these errors were encountered: