xmapix#

pybrops.core.util.array.xmapix(ntaxa, nparent, unique_parents)[source]#

Generate lists containing indices for cross maps.

Parameters:
  • ntaxa (int) – Number of parental candidates.

  • nparent (int) – Number of parents to select from the parental candidates per cross.

  • unique_parents (bool) – Whether parents should be unique. If False allow self crosses.

Returns:

out – A list of length nparent containing parental indices.

Return type:

list