moptipy.operators.ordered_choices package

The operators for moptipy.spaces.ordered_choices spaces.

Submodules

moptipy.operators.ordered_choices.op0_choose_and_shuffle module

A nullary operator filling a ordered_choices.

class moptipy.operators.ordered_choices.op0_choose_and_shuffle.Op0ChooseAndShuffle(space)[source]

Bases: Op0

Randomly initialize ordered_choices elements.

op0(random, dest)[source]

Fill the destination with random choices and shuffle it.

Parameters:
  • random (Generator) – the random number generator

  • dest (ndarray) – the destination array

Return type:

None