py_pcha
py_pcha copied to clipboard
Fixed furthest_sum initialization error
The furthest_sum procedure occasionally generates an initial index value that is exactly the length of I
, which causes an IndexError
. To fix it, I changed the index selection step to force it to select a valid value from I
.
God, now I look at it, it's hard to understand how I wrote it that way. Must have assumes np.random.rand()
can never be one.