bayespy.utils.random.mask

bayespy.utils.random.mask(*shape, p=0.5)[source]

Return a boolean array of the given shape.

Parameters:
  • d0 (int) – Shape of the output.

  • d1 (int) – Shape of the output.

  • ... (int) – Shape of the output.

  • dn (int) – Shape of the output.

  • p (value in range [0,1]) – A probability that the elements are True.