py_pcha icon indicating copy to clipboard operation
py_pcha copied to clipboard

Fixed furthest_sum initialization error

Open mpmbq2 opened this issue 2 years ago • 1 comments

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.

mpmbq2 avatar Aug 05 '22 18:08 mpmbq2

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.

ulfaslak avatar Aug 09 '22 04:08 ulfaslak