For indicator matrix $F$, each row of $F$ has only one 1 and each column of $F$ has at least one 1.
An example in python is as follow
import numpy as np
n = 5
c = 3
F = np.zeros((n, c))
rand_num = np.zeros((n, 1))
while len(np.unique(rand_num)) != c:
rand_num = np.random.randint(0, c, (n, 1))
F[np.arange(n).reshape(n,1), rand_num] = 1
print(F)
Any help is appreciated.