In pytorch I can create a random zero and one tensor with around %50 distribution of each
import torch 
torch.randint(low=0, high=2, size=(2, 5))

I am wondering how I can make a tensor where only 25% of the values are 1s, and the rest are zeros?