bayespy.utils.random.mask

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

Return a boolean array of the given shape.

Parameters:
d0, d1, …, dn : int

Shape of the output.

p : value in range [0,1]

A probability that the elements are True.