Skip to content
Discussion options

You must be logged in to vote

You should be able to do this via a simple mapping vector and some fancy indexing/masking logic:

mapping = torch.full((indx_g1.size(0), ), -1, dtype=torch.long)
mapping[g1_simpl] = torch.arange(g1_simple.size(0))

indx_g1 = mapping[indx_g1]
mask = indx_g1 != -1
indx_g1 = indx_g1[mask]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dhorka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants