The original method can cause IndexError in some cases.
I stumbled on this bug in my experiments and one way to reproduce the error is to modify the method's inputs to sequences = [sequences[0][:17]] and n_items = 4.
The fix in this PR is simple, it may not be the optimal though.
The original method can cause IndexError in some cases.
I stumbled on this bug in my experiments and one way to reproduce the error is to modify the method's inputs to
sequences = [sequences[0][:17]]
andn_items = 4
. The fix in this PR is simple, it may not be the optimal though.