etho.utils.shuffled_cycle#

class etho.utils.shuffled_cycle.shuffled_cycle(it: Iterable, shuffle: str = 'block')[source]#

Shuffled cycle.

cycle(‘ABCD’) –> ABCD ABCD ABCD … cycle(‘ABCD’, shuffle=’block’) –> ACBD BDCA CDAB … cycle(‘ABCD’, shuffle=’full’) –> ACCBBDBDCABA …

.

Parameters
  • it – Iterable

  • shuffle – None, ‘block’, ‘full’