npartite function

Computes indices for a masked-one-mode network