You have 1,000 examples but only 10 labels. Label propagation spreads the known labels along a similarity graph, so unlabelled points take the label of the region they sit in.
Implement label_propagation(X, labels, gamma=1.0, iters=1000, tol=1e-6), where labels uses -1 for unlabelled points and 0..K-1 otherwise:
F = T @ F, then clamp the labelled rows back to their one-hot values, until the largest change is below tol or iters is reached.(predicted_labels, F), where predictions are the row argmax.